This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$css = @" | |
@font-face{ | |
font-family:"Roboto Condensed"; | |
src:url(data:application/font-woff;charset=utf-8;base64,your_base64_encoded_long_string) format("woff"); | |
font-weight: normal; | |
font-style: normal; | |
} | |
"@ | |
Get-ChildItem -Path $env:TEMP -Filter *.woff -Recurse | ForEach-Object { | |
$base64 = [System.Convert]::ToBase64String([System.IO.File]::ReadAllBytes($_)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_greeting | |
echo ' '(set_color F00)'___ | |
___======____='(set_color FF7F00)'-'(set_color FF0)'-'(set_color FF7F00)'-='(set_color F00)') | |
/T \_'(set_color FF0)'--='(set_color FF7F00)'=='(set_color F00)') '(set_color red)(whoami)'@'(hostname)' | |
[ \ '(set_color FF7F00)'('(set_color FF0)'0'(set_color FF7F00)') '(set_color F00)'\~ \_'(set_color FF0)'-='(set_color FF7F00)'='(set_color F00)')'(set_color yellow)' Uptime: '(set_color white)(uptime | sed 's/.*up \([^,]*\), .*/\1/')(set_color red)' | |
\ / )J'(set_color FF7F00)'~~ \\'(set_color FF0)'-='(set_color F00)') IP Address: '(set_color white)(hostname -I)(set_color red)' | |
\\\\___/ )JJ'(set_color FF7F00)'~'(set_color FF0)'~~ '(set_color F00)'\) '(set_color yellow)'Version: '(set_color white)(echo $FISH_VERSION)(set_color red)' | |
\_____/JJJ'(set_color FF7F00)'~~'(set_color FF0)'~~ '(set_color F00)'\\ | |
'(set_color FF7F00)'/ '(set_color FF0)'\ '(set_color FF0)', \\'(set_color F00)'J'(set_color |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$csv = Get-Content -Path $env:USERHOME\EXAMPLE.CSV | |
$bodies = $csv | Where-Object -FilterScript { $_ -match '^"[^,][^,"]+","'} | ForEach-Object { $csv.IndexOf($_) } | |
$emails = for($i=0; $i -lt $bodies.Count; $i++){ $csv[$bodies[$i]..($bodies[$i+1]-1)] | Out-String | ForEach-Object { $_ -replace '[\r\n]+','¶' -replace '\t','⇥' -replace '"¶','"'} | Write-Output } | |
$emails | Out-File -FilePath ($temp = New-TemporaryFile) -Encoding utf8 | |
$temp | Out-Host |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$gpx = Get-Clipboard -Raw | ForEach-Object { [xml]$_ } | |
foreach ($trkpt in $gpx.gpx.trk.trkseg.trkpt) | |
{ | |
$lat = $trkpt.lat | |
while ($lat.Length -lt 32) | |
{ | |
$lat += Get-Random | |
} | |
$trkpt.lat = -join $lat[0..31] | |
$lon = $trkpt.lon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Updates FFMPEG to the latest version | |
$ffmpegGH = @{OWNER = 'GyanD'; REPO = 'codexffmpeg' } | |
$extractTo = Join-Path -Path $env:USERPROFILE -ChildPath 'ffmpeg' | |
if (-not ([System.Management.Automation.PSTypeName]'SevenZipExtractor.ArchiveFile').Type) | |
{ | |
if (-not (Get-Package -Name SevenZipExtractor -ErrorAction Ignore)) | |
{ | |
Install-Package SevenZipExtractor -Source nuget.org -Scope CurrentUser | |
} | |
Get-Package -Name SevenZipExtractor | ForEach-Object { Add-Type -LiteralPath ($_.Source | Split-Path | Get-ChildItem -Filter 'netstandard*' -Recurse -Directory | Get-ChildItem -Filter *.dll -Recurse -File ).FullName } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from slugify import slugify | |
cue_file = r'''C:/Users/mavad/Downloads/Philip Glass - Akhnaten/CD1/Philip Glass - Akhnaten (CD1).cue''' | |
d = open(cue_file).read().splitlines() | |
general = {} | |
tracks = [] | |
current_file = None |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install-Package AngleSharp -Scope CurrentUser -Source Nuget -SkipDependencies | |
Get-Package -Name 'AngleSharp' | ForEach-Object { Split-Path $_.Source } | Get-ChildItem -Filter '*.dll' -Recurse | Where-Object {$_ -Like "*standard*"} | Select-Object -Last 1 | ForEach-Object { Add-Type -Path $_ -ErrorAction SilentlyContinue -Verbose } | |
$searchTerm=$identifier | |
$request = Invoke-WebRequest -Uri 'http://libgen.is/search.php?req=9780199568925&open=0&res=25&view=simple&phrase=1&column=identifier&sort=year&sortmode=DESC' | |
$parser = [AngleSharp.Html.Parser.HtmlParser]::new() | |
$parsedContent = $parser.ParseDocument($request.Content) | |
$requestDL = Invoke-WebRequest -Uri ($parsedContent.QuerySelector('body > table.c').QuerySelector("body > table.c > tbody > tr:nth-child(2) > td:nth-child(10) > a").href) | |
$parsedDLContent = $parser.ParseDocument($requestDL.Content) | |
$uri = [uri]::new(($parsedDLContent.QuerySelector("#download > h2 > a").href)) | |
Invoke-WebRequest -Uri ($parsedDLContent.QuerySelector("#download > h2 > a").href) -Ou |