These keybindings make working with iTerm2 on a Mac much easier! Credit to https://stackoverflow.com/a/22312856 (@sqren)
Keyboard Combination: ⌥
+ ←
Action: Send Hex Code
Code: 0x1b 0x62
javascript: (function() { | |
'use strict'; | |
const videoEls = document.querySelectorAll('video'); | |
videoEls.forEach((videoEl) => { | |
if (typeof videoEl.requestPictureInPicture === 'function') { | |
videoEl.requestPictureInPicture(); | |
} | |
}); | |
})(); |
// ==UserScript== | |
// @name Bandcamp Silent Lurk | |
// @namespace http://*.bandcamp.com/* | |
// @version 0.1 | |
// @description I felt weird that Bandcamp notifies people when I buy stuff from the feed, so I think this disables that | |
// @author https://github.com/gregilo | |
// @match https://*.bandcamp.com/* | |
// @exclude https://bandcamp.com/download* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=bandcamp.com | |
// ==/UserScript== |
// ==UserScript== | |
// @name Bandcamp Feed Player | |
// @namespace http://bandcamp.com/ | |
// @version 0.1 | |
// @description Adds scrubbing, play/pause, and volume control to the player on the Bandcamp feed page | |
// @author https://github.com/gregilo | |
// @match https://bandcamp.com/*/feed* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=bandcamp.com | |
// @grant none | |
// ==/UserScript== |
// ==UserScript== | |
// @name Google IFL Auto-click | |
// @namespace https://www.google.com | |
// @version 0.1 | |
// @description Auto-click I'm feeling lucky link on redirect notice page | |
// @author gregilo | |
// @match https://www.google.com/url?q=* | |
// @grant none | |
// ==/UserScript== |
These keybindings make working with iTerm2 on a Mac much easier! Credit to https://stackoverflow.com/a/22312856 (@sqren)
Keyboard Combination: ⌥
+ ←
Action: Send Hex Code
Code: 0x1b 0x62
{ | |
"Drupal dump": { | |
"scope": "twig", | |
"prefix": "dd", | |
"body": "{{ dd($1) }}" | |
}, | |
"if": { | |
"scope": "twig", | |
"prefix": "if", | |
"body": [ |
// ==UserScript== | |
// @name Stop YouTube Channel Autoplay | |
// @namespace https://github.com/gregilo | |
// @version 0.2 | |
// @description Stop featured videos from autoplaying on YouTube Channel landing pages | |
// @author gregilo | |
// @match https://www.youtube.com/channel* | |
// @match https://www.youtube.com/user* | |
// @grant none | |
// ==/UserScript== |
'.php': | |
'Var dump': | |
'prefix': 'var_dump' | |
'body': 'echo "<pre>";var_dump($1);echo "</pre>";$2' | |
'print_r': | |
'prefix': 'print_r' | |
'body': 'echo "<pre>";print_r($1);echo "</pre>";$2' |
filetype plugin indent on | |
syntax on | |
set term=xterm-256color | |
set mouse=a |
[alias] | |
delete = "!f(){ local branch_name=$1;git branch -d $branch_name && (git remote | xargs -L1 -I '{}' git push {} :$branch_name);};f" # delete a branch locally and from all remotes | |
rd = "!f(){ local branch_name=$1;(git remote | xargs -L1 -I '{}' git push {} :$branch_name);};f" # delete a branch from all remotes | |
pruneall = "!f(){ git remote | xargs -L1 git remote prune;};f" # prune all remotes | |
local-branches = !git branch -vv | cut -c 3- | awk '$3 !~/\\[/ { print $1 }' # list branches that exist locally but not in remotes | |
update = "!f(){ git fetch --all && git pruneall && git status; };f" # fetch and prune all remotes, then run `git status` | |
upull = !git update && git pull # fetch and prune all remotes (via update alias), then pull | |
plog = "log --color --graph --pretty=format:'%C(auto)%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit --date=relative" # prettier `git log` | |
branchdiff = !git diff --unified=1 main...HEAD # diff against main | |
lstash = !git stash list |