Skip to content

Instantly share code, notes, and snippets.

@triple-j
triple-j / DisallowShaking.reg
Last active July 3, 2022 15:35
Disable Aero Shake in All Versions of Windows 10 via the Registry (https://www.askvg.com/guide-how-to-create-registry-script-reg-files-in-windows/)
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"DisallowShaking"=dword:00000001
@triple-j
triple-j / download.py
Last active October 26, 2019 03:44 — forked from wy193777/download.py
Download file through HTTP using requests.py and tqdm
import os.path
from urllib.request import urlopen
import requests
from tqdm import tqdm
def download_from_url(url, dst):
"""
@param: url to download file
@param: dst place to put the file
@triple-j
triple-j / __git-changes.sh
Created July 25, 2017 22:09
Find all the files changed/deleted since a given commit
#!/bin/bash
OLDCOMMIT=$1
OUTDIR="__UPDATES__"
DELETED=""
FILES=`git diff --name-only $OLDCOMMIT`
rm --force --recursive "$OUTDIR"
@triple-j
triple-j / formDataToQueryString.js
Created April 13, 2017 16:27
FormData To QueryString
function formDataToQueryString(formData) {
var queryParams = [];
for(var pair of formData.entries()) {
queryParams.push(encodeURIComponent(pair[0]) + "=" + encodeURIComponent(pair[1]));
}
return queryParams.join('&');
}
<NotepadPlus>
<UserLang name="BrightScript-Obsidian" ext="brs">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="no" commentLine="no" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">&quot;00&quot;00</Keywords>
<Keywords name="Folder+"></Keywords>
/**
* Retrieve URL Parameters <http://stackoverflow.com/a/1099670>
* @param {string} [qs=window.location.search] - Query string
* @returns {object}
*
* @example
* var query = getQueryParams(document.location.search);
* alert(query.foo);
*/
function getQueryParams(qs) {
@triple-j
triple-j / clickcheat.py
Last active October 23, 2016 21:20
Automatic Mouse Clicker
#!/usr/bin/env python3
# Automatic Mouse Clicker
# For use with the game [**Crush Crush**](http://store.steampowered.com/app/459820/)
# Hold down CTRL+SHIFT to save mouse position
# Hold down ALT to move mouse and rapidly send a mouse click events
# (Linux Only: requires programs `xinput` and `xdotool`)
import re
import subprocess
#!/bin/sh
sudo apt-get install --yes docker.io
sudo usermod -aG docker $USER
su - $USER
@triple-j
triple-j / batchscan
Created March 12, 2016 03:40
batch scanner for `scanimage`
#!/bin/bash
## variables ##
NUM=0
PRE=""
X=""
Y=""
RES=""
QAL=""
REV=""
@triple-j
triple-j / rpi-install-nginx-php.sh
Last active March 7, 2016 03:03
Setup Nginx and PHP on RaspPi
#!/bin/sh
sudo apt-get install --yes nginx php5-fpm
sudo cp /etc/nginx/sites-enabled/default /etc/nginx/sites-available/default-backup-$(date +%s)
mkdir --parents /home/$USER/nginx/www
echo "server {
listen 80 default_server;