Skip to content

Instantly share code, notes, and snippets.

mouseHook := SetWindowsHookEx(14, "LowLevelMouseProc")
, keyboardHook := SetWindowsHookEx(13, "LowLevelKeyboardProc")
exit
SetWindowsHookEx(idHook, callback) {
if (!hHook := DllCall(Format("SetWindowsHookEx{}", (A_IsUnicode) ? ("W") : ("A")), "Int", idHook, "Ptr", RegisterCallback(callback, "Fast"), "Ptr", DllCall("GetModuleHandle", "UInt", 0, "Ptr"), "UInt", 0, "Ptr")) {
throw (Exception(Format("0x{:X}", A_LastError), -1, FormatMessage(A_LastError)))
}
@ahbanavi
ahbanavi / amozeshyar_bypass_igap.user.js
Created February 20, 2021 11:05
Bypass Amozeshyar iGap code
// ==UserScript==
// @name Amozeshyar Bypass iGap
// @version 1
// @description Bypass Amozeshyar iGap code
// @author Yedoost
// @match http://stdn.iau.ac.ir/Student/captchaProcess
// @match http://stdn.iau.ac.ir/Student/manageAccount
// @grant none
// ==/UserScript==
@m-Phoenix852
m-Phoenix852 / index.user.js
Last active May 3, 2024 05:09
Userscript to login to discord accounts with ease, just do SHIFT + T at the login page and enter the token!
// ==UserScript==
// @name Discord Token Login
// @namespace https://gist.github.com/m-Phoenix852/d63d869f16e40dac623c9aa347e8641a/
// @version 1.1
// @description Taking over discord's tokens!
// @author Phoenix852
// @match *://discord.com/login
// @updateURL https://gist.github.com/m-Phoenix852/d63d869f16e40dac623c9aa347e8641a/raw/6d1ee63df17685e4ea06018bd8b47541d4261b82/index.user.js
// @grant none
// @iconURL https://i.imgur.com/rI8GsTz.png
@swyoon
swyoon / download_files_from_googledrive.py
Created July 4, 2020 14:51
A script for downloading all files in a Google Drive folder.
"""
A Python script for downloading all files under a folder in Google Drive.
Downloaded files will be saved at the current working directory.
This script uses the official Google Drive API (https://developers.google.com/drive).
As the examples in the official doc are not very clear to me,
so I thought sharing this script would be helpful for someone.
To use this script, you should first follow the instruction
in Quickstart section in the official doc (https://developers.google.com/drive/api/v3/quickstart/python):
@zjx20
zjx20 / convert.sh
Last active February 7, 2024 02:04
Convert v2ray config.json (client side) to a subscription content
#!/bin/bash
# brew install jq
# brew install qrencode
config_file=v2rayx*.json
rss_file=rss.txt
cat $config_file | \
jq --raw-output '
@ryo-ARAKI
ryo-ARAKI / starship.toml
Last active May 17, 2024 07:10
Starship configuration file
# ~/.config/starship.toml
[battery]
full_symbol = "🔋"
charging_symbol = "🔌"
discharging_symbol = ""
[[battery.display]]
threshold = 30
style = "bold red"
@priteshjha4u
priteshjha4u / promiseAll.js
Created August 8, 2019 11:04
Promise.all implementation in vanilla JavaScript
function promiseAll() {
if (!arguments.length) {
return Promise.resolve(null);
}
var args = arguments;
if (args.length === 1 && Array.isArray(args[0])) {
args = args[0];
}
var count = 1;
var total = args.length;
@dcragusa
dcragusa / voicemeeter.ahk
Created August 6, 2019 01:19
Various hotkeys to control Voicemeeter Banana
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance Force
WinWait, ahk_exe voicemeeterpro.exe ; wait for voicemeeter
DllLoad := DllCall("LoadLibrary", "Str", "C:\Program Files (x86)\VB\Voicemeeter\VoicemeeterRemote64.dll")
@Benoss
Benoss / 00-usage.md
Created November 9, 2018 02:45
AutoSSH Tunnel Config

Create a new local tunnel user to keep the .ssh/config clean

sudo useradd -g nogroup -s /bin/false -m tunnel
sudo -u tunnel mkdir -p ~tunnel/.ssh  # and copy your private key here
sudo -u tunnel nano ~tunnel/.ssh/config  # add host and key configs here and a myhostsshconf (or other name)
sudo -u tunnel ssh myhostsshconf  # just make sure to add your host to `known_hosts`

Create a new systemd service with the same name than an entry in the .ssh/config (myhostsshconf in this example)

@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active May 8, 2024 07:24
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat