Skip to content

Instantly share code, notes, and snippets.

View Delivator's full-sized avatar
🏠
Working from home

David Delivator

🏠
Working from home
View GitHub Profile
@Delivator
Delivator / lockmicvolume.ps1
Created February 7, 2019 21:13
A little powershell script that sets the default microphone volume to a set value, requires nircmd.exe to be in same directory as the script
# How long it should wait between every loop in seconds
$secondsToWait = 5
# The volume you want in percent (0.92 = 92%)
$volume = 1.00
Write-Host "Starting invinite loop, press CTRL + C or close the window to stop"
while (1) {
Start-Process -FilePath "nircmd.exe" -WorkingDirectory $PSScriptRoot -ArgumentList "setsysvolume $([math]::floor(65535 * $volume))","default_record" -Wait
Write-Host "Volume set to $($volume * 100)%"
Start-Sleep -Seconds $secondsToWait
@Delivator
Delivator / leave_apex_lobby.ncl
Created June 2, 2019 19:59
Apex Legends quit nircmd macro/script [1920x1080]
sendkey esc press
wait 250
setcursor 960 624
wait 10
sendmouse left click
wait 250
setcursor 847 721
wait 10
sendmouse left click
@Delivator
Delivator / amazon_smile_redirect.user.js
Last active August 14, 2019 10:26
Amazon Smile redirect
// ==UserScript==
// @name Amazon Smile redirect
// @namespace https://Bgmn.me
// @version 0.4
// @description Redirects www.amazon.de & www.amazon.com url to the respective smile.amazon.tdl domain
// @author Bgmn.me
// @include https://www.amazon.*
// @grant none
// @homepage https://gist.github.com/Delivator/1c124681d85d0e9046214397ee6aaed3
// ==/UserScript==
#!/bin/bash
function paste.click(){
if [ -z "$1" ]; then
curl -s --data-binary @- https://paste.click/s/;
else
curl -s --data-binary @$1 https://paste.click;
fi;
};
import os
import sys
from siaskynet import Skynet
# upload
print("Uploading", str(sys.argv[1]))
skylink = Skynet.UploadFile(str(sys.argv[1]))
print("Upload successful, skylink: " + skylink)
os.system("echo " + skylink + " | clip")
{
"Version": "13.0.1",
"Name": "Siasky",
"DestinationType": "ImageUploader, TextUploader, FileUploader",
"RequestMethod": "POST",
"RequestURL": "https://siasky.net/skynet/skyfile/sharex-$random:a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9$$random:a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9$$random:a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9$$random:a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9$$random:a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9$$random:a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9$$random:a|b|c|d|e|f|g|h|i|j|k|l|m|n|
param (
$infile
)
$date = "{0:yyyy}_{0:MM}-{0:dd}_{0:HH}-{0:mm}" -f (get-date)
Get-ChildItem $infile | Rename-Item -Path $infile -NewName { $_.basename + "_" + $date + $_.extension }
@Delivator
Delivator / Skynet (SiaSky.net).sxcu
Last active February 17, 2022 22:25
ShareX Skynet Uploader
{
"Version": "13.0.1",
"Name": "Skynet (SiaSky.net)",
"DestinationType": "ImageUploader, TextUploader, FileUploader",
"RequestMethod": "POST",
"RequestURL": "https://siasky.net/skynet/skyfile",
"Body": "MultipartFormData",
"FileFormName": "file",
"URL": "https://siasky.net/$json:skylink$"
}
@Delivator
Delivator / compress_dirs.ps1
Created April 2, 2020 14:24
PS compress all directories in current directory
Get-ChildItem -Directory | ForEach-Object -Process {Compress-Archive -Path ".\$_\*" -DestinationPath ".\$_.zip"}
@Delivator
Delivator / skylinks.txt
Created May 18, 2020 19:55
SiaSky Public skylinks