stefangreve / profile Goto Github PK
View Code? Open in Web Editor NEWPowerShell Profile
License: MIT License
PowerShell Profile
License: MIT License
ABOUT ===== Trying to build cool stuff for other Windows developers.
If a value is added to an empty key, then the value stored if prefixed with a semicolon (which consequently breaks the path).
Example:
> Set-EnvironmentVariable -Value "C:\java" -Key "CLASSPATH"
> echo $env:CLASSPATH
;C:\java
Suggested additional features:
Implement an ArgumentCompleter
for the Key
Parameter in
Set-EnvironmentVariable
Get-EnvironmentVariable
Remove-EnvironmentVariable
The Get-Calendar
Cmdlet currently pretty-prints a specific month or year to the terminal, but something more useful than that would probably integrate data from Outlook or Gmail in some capacity. That way this new feature could emit an array of PowerShell object with the following properties:
Name | Type | Nullable |
---|---|---|
Subject |
string |
false |
StartDate |
datetime |
true |
EndDate |
datetime |
true |
Location |
string |
true |
List of proposed parameters:
Provider
(using the ValidateSetAttribute
for selecting Microsoft
or Google
)Get-Calendar
Cmdlet. One downside of this technique would be that it blows up the Cmdlet body considerably, but on the bright side it emphasizes that all these functions belong together.Since Linux 2.6.24 it is recommended to read this information from /sys/class/power_supply/BAT1
, e.g.
PS > cat /sys/class/power_supply/BAT1/capacity
99
or
PS > cat /sys/class/power_supply/BAT1/status
charging
After testing this profile on Linux I noticed a few issues that should be addressed in the next release:
:
as split character in Get-EnvironmentVariable
, Set-EnvironmentVariable
and Remove-EnvironmentVariable
on Linux$env:USERNAME
isn't set by default in Raspbian OS$env:COMPUTERNAME
winfetch
to neofetch
on WindowsLoading personal and system profiles took 4140ms.
)
Additionally, update the README.md
file to include further tips and tricks for Unix-based operating systems.
This Cmdlet should return a custom object with the following properties
LineEndings
: CRLF or LF (as string values)Encoding
: compare remark [1] (as an enum)There have been a couple of implementation attempts in the past, though their reliability
is sometimes questionable [2] [3].
[1]: List of common character encodings: https://en.wikipedia.org/wiki/Character_encoding
[2]: C# code from SO: https://stackoverflow.com/a/62814282/10827244
[3]: Some godforsaken batch function, also from SO: https://stackoverflow.com/a/43147510/10827244
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.