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
# Hacker News front page | |
news.ycombinator.com##html[op=news] .submission, html[op=news] .subtext | |
# All old.reddit.com homepages (including subreddits, tabs) | |
reddit.com##.listing-page #siteTable | |
# Video comments, video recommendations, entire homepage | |
www.youtube.com###contents | |
# Next-up tiles |
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() { | |
// https://www.justwatch.com/us/lists/my-lists?content_type=movie&inner_tab=seenlist&list_layout=card | |
// https://www.justwatch.com/us/lists/my-lists?content_type=movie&inner_tab=watchlist&list_layout=card | |
// https://www.justwatch.com/us/lists/my-lists?content_type=movie&inner_tab=likelist&list_layout=card | |
// https://letterboxd.com/about/importing-data/ | |
const total = parseInt(document.querySelector('.titles-count').textContent, 10) | |
const titles = document.getElementsByClassName('title-card-heading') | |
console.assert(titles.length === total, 'please scroll down until all titles are loaded') | |
return Array.prototype.reduce.call( | |
titles, |
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
" Alternative to GFiles: integrate with Fugitive to work better in edge cases | |
" Completion should actually be pathspec, not file, but close enough | |
command -bang -nargs=* -complete=file FugitiveFiles | |
\ call fzf#run(fzf#wrap('gfiles', fzf#vim#with_preview({ | |
\ 'source': FugitiveShellCommand('ls-files', '-z', '--', <f-args>), | |
\ 'options': '--read0 --multi --no-clear --prompt=' . shellescape('FugitiveFiles> ') | |
\ }), <bang>0)) |
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/sh | |
# Must be on UCLA's campus network (e.g. using VPN) | |
curl https://movies.reslife.ucla.edu/jsonapi/GetAllContent | jq -r '.[].Title' | sort |
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
Gautam libarpt_mangle.c | |
Gautam libebt_dnat.c | |
Gautam libebt_mark_m.c | |
Gautam libebt_stp.c | |
Gautam libip6t_dst.c | |
Gautam libip6t_icmp6.c | |
Gautam libip6t_NETMAP.c | |
Gautam libip6t_SNPT.c | |
Gautam libipt_ECN.c | |
Gautam libipt_realm.c |
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
const http = require('http') | |
// The malicious proxy configuration script | |
// Replaces the real script | |
// Directs all requests to malicious proxy server | |
function FindProxyForURL(url, host) { | |
return "PROXY ::1:8080"; | |
} | |
// The man in the middle |
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
# When the given command terminated, run it again unless interrupted | |
retry() { | |
while :; do | |
"$@" | |
tput bold; tput setaf 1 | |
echo "Retrying $1 (Ctrl-C to cancel)" | |
tput sgr0 | |
sleep .5 |
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
# Make sure everything is up to date (optional) | |
sudo apt-get update | |
sudo apt-get dist-upgrade -y | |
# Prerequisites | |
sudo apt-get install build-essential git cmake make pkg-config v4l-utils libv4l-0 libv4l-dev -y | |
# Download OpenCV | |
git clone https://github.com/opencv/opencv.git |
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 strict"; | |
/* Simple async resource loader */ | |
class Loader { | |
constructor() { | |
this.promises = []; | |
} | |
get(src, type = Image) { |
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 randInt() { | |
return Math.trunc(Math.random() * Number.MAX_SAFE_INTEGER); | |
} |
NewerOlder