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
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")
#!/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;
};
@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==
@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 / 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 / transcode_all_mp4.ps1
Last active December 26, 2022 15:37
Re-encodes all .mp4 files in the same folder as the script to decrease their size
$location = Get-Location
$files = Get-ChildItem $location -Filter "*.mp4" | Sort-Object CreationTime
$quality = "36"
$counter = 0
$total = $files.Length
# Change Write-Progress Style
$PSStyle.Progress.MaxWidth = 240
Write-Host "Transcoding all mp4 files in this directory to mkv using NVENC AV1 with CQ $quality"

Keybase proof

I hereby claim:

  • I am delivator on github.
  • I am delivator (https://keybase.io/delivator) on keybase.
  • I have a public key ASCSN78grQ-QOlTffm_S0ELDaFY4Tc8wlsLGZ3MbJUwSewo

To claim this, I am signing this object:

@Delivator
Delivator / disk-usage.php
Last active December 19, 2018 22:06
materialize based dashboard for my bananapi-nas
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Disk Usage</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="material-icons.css" rel="stylesheet">
<link rel="stylesheet" href="materialize.min.css">
<style>
@Delivator
Delivator / rename_images.ps1
Created July 12, 2018 15:40
Rename all .jpg images in a folder to a "img_####.jpg" format for easy ffmpeg usage.
$i = 1
Get-ChildItem *.jpg | %{Rename-Item $_ -NewName ("img_{0:D4}.jpg" -f $i++)}
// ==UserScript==
// @name Skribbl drawing downloader
// @namespace https://delivator.me/
// @version 0.4
// @description Adds a button to skribbl.io to save the drawing
// @author Delivator
// @match https://skribbl.io/*
// @grant none
// @homepage https://gist.github.com/Delivator/091d7aa72e785782a351fe9bcd7f7e1a
// @icon https://skribbl.io/res/favicon.png