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
#!/usr/bin/env python3 | |
import glob | |
import json | |
import msvcrt | |
import os | |
import requests | |
import shutil | |
import subprocess |
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
param ( | |
[Alias('f')][string] $File = '0.png', | |
[Alias('i')][switch] $Images, | |
[Alias('v')][switch] $Video | |
) | |
function Start-Gen { | |
param ([string] $Encoder, [string] $InFile, [long] $TargetSize, [string[]] $ExOptions = @(), [string] $Title, [string] $Font, [string] $Color) | |
$MergeFile = $InFile -replace '\.png$', '_.png' | |
switch ($Encoder) { 'cjpeg' { $OutExt = '.jpg' }; 'cjpegli' { $OutExt = '.jpg' }; 'avifenc' { $OutExt = '.avif' }; 'cjxl' { $OutExt = '.jxl' }} | |
$OutFile = $InFile -replace '\.png$', $OutExt |
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
#!/bin/bash | |
while getopts 'cbd' flag ; do | |
case "${flag}" in | |
c) CLNFL=1 ;; # remove folder | |
b) BLD=1 ;; # build | |
d) DPL=1 ;; # deploy | |
esac | |
done | |
set -e |
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
#!/bin/bash | |
while getopts 'csajpyd' flag ; do | |
case "${flag}" in | |
c) CLR=1 ;; # remove clang folder | |
s) DSRC=1 ;; # download source-code | |
a) BAVIF=1 ;; # build libavif | |
j) BJXL=1 ;; # build libjxl | |
p) BPLGS=1 ;; # build plugins | |
y) BYACR=1 ;; # build yacreader | |
d) DYACR=1 ;; # deploy yacreader |
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
#!/bin/bash | |
while getopts 'csajpeoqd' flag ; do | |
case "${flag}" in | |
c) CLR=1 ;; # remove ucrt folder | |
s) DSRC=1 ;; # download source-code | |
a) BAVIF=1 ;; # build libavif | |
j) BJXL=1 ;; # build libjxl | |
p) BPLGS=1 ;; # build plugins | |
e) BEXIV=1 ;; # build exiv2 | |
o) BOPCV=1 ;; # build opencv |
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
$shell = New-Object -comObject WScript.Shell | |
$shortcut = $shell.CreateShortcut("$PSScriptRoot\Google Chrome.lnk") | |
$shortcut.TargetPath = "$PSScriptRoot\app\chrome.exe" | |
$shortcut.WorkingDirectory = "$PSScriptRoot\app" | |
$shortcut.Arguments = ( | |
'--user-data-dir=Z:\ChromeData', | |
'--disk-cache-size=104857600', | |
'--disable-component-update', | |
'--disable-default-apps', | |
'--disable-sync', |
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
$null = [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | |
$null = [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | |
$Title = "Test" | |
$Message = "Test" | |
$XmlString = @" | |
<toast> | |
<visual> | |
<binding template="ToastGeneric"> |
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
Set-Location $PSScriptRoot | |
$tJson = .\smartctl.exe -j -A /dev/sda | ConvertFrom-Json | |
$totallba = ($tJson.ata_smart_attributes.table | where { $_.id -eq 241 }).raw.value | |
$lasttlba = Get-Content -Path "last" | |
$inGB = ([Math]::Round($totallba * 512 / 1GB, 2)).ToString("0.00") | |
$diff = ([Math]::Round(($totallba - $lasttlba) * 512 / 1MB, 2)).ToString("0.00") | |
$curDT = (Get-Date -Format "yyyy/MM/dd HH:mm:ss") |
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
$downloadpath = "D:\Downloads" | |
$curversion = (Get-Content -Path "resources\app\package.json" | ConvertFrom-Json).version | |
$newversion = (Invoke-WebRequest -Uri "https://api.github.com/repos/microsoft/vscode/releases/latest" | ConvertFrom-Json).tag_name | |
Write-Host "Visual Studio Code - Updater" -ForegroundColor Cyan | |
Write-Host "Current version: " -NoNewLine | |
Write-Host $curversion -ForegroundColor Yellow | |
Write-Host "New version: " -NoNewLine | |
Write-Host $newversion -ForegroundColor Green | |
$choice = Read-Host -Prompt "Type 'y' or 'yes' to update current version" | |
If (-not ($choice.ToLower() -in @("y", "yes"))) { exit } |
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
# params | |
[CmdletBinding(DefaultParameterSetName="Casual")] | |
param ( | |
[Alias("c")] | |
[Parameter(ParameterSetName = "Pro", Mandatory = $true)] | |
[ValidateSet("stable", "beta", "dev", "canary")] | |
[string]$Channel, | |
[Alias("v")] | |
[Parameter(ParameterSetName = "Pro", Mandatory = $true)] | |
[ValidateNotNullOrEmpty()] |
NewerOlder