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
debounceLeftClick() | |
{ | |
Sleep, 10 | |
if !GetKeyState("LButton", "P") | |
{ | |
n := 1 | |
BlockInput, On | |
Loop { | |
Sleep, 10 | |
if (n++ > 9) |
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 | |
### | |
### my-script — does one thing well | |
### | |
### Usage: | |
### my-script <input> <output> | |
### | |
### Options: | |
### <input> Input file to read. | |
### <output> Output file to write. Use '-' for stdout. |
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
# use bash as the default shell | |
SHELL := bash | |
# ensures each Make recipe is ran as one single shell session, rather than one new shell per line | |
.ONESHELL: | |
# use bash strict mode. http://redsymbol.net/articles/unofficial-bash-strict-mode/ | |
.SHELLFLAGS := -eu -o pipefail -c | |
# remove target files when Make file failed | |
.DELETE_ON_ERROR: | |
# warning when referring the undefined variables | |
MAKEFLAGS += --warn-undefined-variables |
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 | |
# _*_ coding:utf-8 _*_ | |
""" | |
Author: Pagliacii | |
Copyright © 2020-Pagliacii-MIT License | |
""" | |
import math | |
from struct import unpack |
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 | |
trap cleanup EXIT | |
set -eux | |
set -o pipefail | |
SWFFILE="$1" | |
MP4FILE="${SWFFILE%.*}.mp4" | |
RAWFILE=$(cat /dev/urandom | tr -dc 'a-zA-Z' | fold -w 32 | head -n 1).raw | |
WAVFILE=$(cat /dev/urandom | tr -dc 'a-zA-Z' | fold -w 32 | head -n 1).wav |
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
{ | |
// Place your snippets for rust here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$1');", |
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
# _*_ coding:utf-8 _*_ | |
from subprocess import Popen, PIPE | |
class AssociationNotFound(Exception): | |
# means: File association not found for extension .ext | |
pass | |
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 bash | |
#=============================================================================== | |
# This script is used to install the vscode extension manually. | |
# Or to install an extension to the code-server. | |
# Inspire by https://github.com/codercom/code-server/issues/171#issuecomment-473690326 | |
# | |
# It has two way to install the extension: | |
# 1. by the extension ID | |
# 2. by the local vsix file |
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 (history, trackingId, options) { | |
const generateId = () => { | |
return '_' + Math.random().toString(36).substr(2, 9); | |
}; | |
const getId = () => { | |
if (!localStorage.cid) { | |
localStorage.cid = generateId() | |
} | |
return localStorage.cid; | |
}; |