This file contains 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 __unblockEvents(){for(var i=0;i<arguments.length;i++){document.addEventListener(arguments[i],function(e){e.stopPropagation();console.log("event received and unblocked:",e);},true);}}; | |
__unblockEvents('keydown','keyup','keypress','copy','contextmenu','beforeprint','afterprint'); | |
document.head.appendChild(Object.assign(document.createElement("style"), {textContent: "* { user-select: initial !important; }"})); | |
// TODO: disabling 'beforeprint' doesnt seem to work. Fix that so its printable. Use Chrome Dev tools to remove that event handler manually in the mean time. |
This file contains 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
open -a Weather "https://weather.apple.com/?city=Boston&lat=42.3226734&lng=-71.0924375" | |
# the 'city' arg can be any string, only the lat/lng is used to look up weather | |
# You can make the string somethng silly and it gets displayed in the app | |
open -a Weather "https://weather.apple.com/?city=Bawston&lat=42.3226734&lng=-71.0924375" | |
# Or if you exclude 'city' arg then Apple just looks up the name based on the lat/long | |
open -a Weather "https://weather.apple.com/?lat=42.3226734&lng=-71.0924375" | |
# Also all of these have `weather://` scheme equivalents, like this: |
This file contains 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
======Roll Remote V2 | |
Introduction | |
The Roll Remote is a powerful miniaturised RF & Remote Control duplication device. Supporting both fixed and rolling codes across multiple frequencies, the device can save and replay multiple signals up to 70m from the target. | |
The device also provides RF bruteforce functionality, and can also duplicate most 125KHz (low-frequency) RFID tags. | |
Functionality at a glance | |
The Roll Remote is purposed built to capture, clone and emulate RF / Remote Controls for residential access control, including alarms, gates, garage doors, etc. | |
It has an extensive database of over 100 compatible brands and models. | |
The device also has brute-force capability for some fixed code systems. |
This file contains 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 | |
import sys | |
from subprocess import call | |
import json | |
import os | |
import requests | |
import shutil | |
import colorama | |
This file contains 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
// ==UserScript== | |
// @name Unbreak Snapchat web. Disable focus tracking, screenshot prevention, and enable video downloads | |
// @name:zh-CN 修复Snapchat网络版:禁用焦点追踪、屏幕截图防护,并启用视频下载 | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1.4 | |
// @description Improve the Snapchat web experience by disabling screenshot prevention features which don't prevent screenshots but do actively harm the usability. And enabling video downloads | |
// @description:zh-CN 通过禁用防护功能并启用视频下载,改善Snapchat网络版的体验。 | |
// @homepage https://gist.github.com/varenc/20e4dbfe8e7a2cc305043ffcbc5454d0 | |
// @author https://github.com/varenc | |
// @match https://web.snapchat.com/* |
This file contains 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
// Sometimes a page tries to thwart extension developers/hackers by overriding the native console.{log,debug,trace,etc} functions. | |
// Or Sentry wraps them with additional logging and you want to prevent your messages showing up in Sentry logs. | |
// To avoid this, we just create a blank iframe and copy the real native console object from there. | |
const iframe = document.createElement('iframe'); | |
iframe.style.display = 'none'; | |
document.body.appendChild(iframe); | |
const nativeConsole = iframe.contentWindow.console; | |
// now to use the real native console.log function, just call: | |
nativeConsole.log("Using the real console.log!") |
This file contains 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
#### Force energy saver mode or tab memory discarding on Google Chrome on macOS | |
# Works even when you're plugged into AC power and not on battery or when your battery or memory is not low. | |
# The script below works by just automating clicks on the chrome://discards page which allows you to force these behaviors | |
# | |
# Setup instructions: | |
# - Just add the functions below to your .zshrc, .bashrc, or any other shell config file | |
# - Or save them to a file and add `source <path-to-file>` to a shell rc | |
# - You must also have Chrome "Allow JavaScript from Apple Events" enabled. This is the Chrome menu: View -> Developer -> Allow JavaScript from Apple Events | |
# - You must also grant macOS accessibility permissions but you should be prompted for this on first run. | |
# |
This file contains 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 | |
# | |
# Bash completion support for launchctl | |
__launchctl_list_sigs () | |
{ | |
echo {,SIG}{HUP,INT,QUIT,ILL,TRAP,ABRT,EMT,FPE,KILL,BUS,SEGV,SYS,PIPE,ALRM,TERM,URG,STOP,TSTP,CONT,CHLD,TTIN,TTOU,IO,XCPU,XFSZ,VTALRM,PROF,WINCH,INFO,USR1,USR2} `seq 1 31 | tr '\n' ' '` | |
} | |
__launchctl_list_pids () |
This file contains 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
#compdef ugrep | |
# zsh completions for 'ugrep' | |
# automatically generated with http://github.com/RobSis/zsh-completion-generator | |
local arguments | |
arguments=( | |
{-A,--after-context}'[output NUM lines of trailing context after matching lines. Places]' | |
{-a,--text}'[process a binary file as if it were text. This is equivalent to]' | |
'--and[PATTERN ... -e PATTERN]' |
This file contains 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
### Extract the contact image from a .vcf file. This is otherwise impossible with macOS contacts. | |
### To work, first export a single contact as a .vcf file. | |
# | |
# Example Usage: | |
# $ extract_vcf_image input.vcf > output.jpg | |
# $ file output.jpg | |
# output.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 72x72, segment length 16, Exif Standard: [TIFF image data, big-endian, direntries=1TIFF image data, big-endian, direntries=1], baseline, precision 8, 148x148, components 3 | |
# | |
# Notes: | |
# - 2nd argument is the output path, if not specified, will output to stdout |