Skip to content

Instantly share code, notes, and snippets.

Avatar

Varun Nayyar nayyarv

View GitHub Profile
@nayyarv
nayyarv / deliveroo.js
Last active Jan 23, 2020
Filter Deliveroo Restaurants
View deliveroo.js
// ==UserScript==
// @name DeliverooBlacklist
// @version 1
// @grant none
// @include https://deliveroo.com.au/restaurants/*
// ==/UserScript==
var blacklist = ["Guzman Y Gomez", "KFC", "McDonald's", "Nando's", "Gong Cha", "Subway" ];
console.log("Running DeliverooBlacklist")
@nayyarv
nayyarv / cdf.sh
Created Sep 8, 2015
OS X bash: Change directory to front most finder window. Copy into .bashrc. Found on stackoverflow.
View cdf.sh
cdf() {
target=`osascript -e 'tell application "Finder" to if (count of Finder windows) > 0 then get POSIX path of (target of front Finder window as text)'`
if [ "$target" != "" ]; then
cd "$target"; pwd
else
echo 'No Finder window found' >&2
fi
}
@nayyarv
nayyarv / pip_upgrade.sh
Last active Jul 27, 2018
Pip upgrade skips external packages and continues in event of upgrade failure. Only user installs.
View pip_upgrade.sh
# pip2
pip2 list outdated T -n+3 | awk '{print $1}' | xargs -n1 pip2 install -U --user
pip3 list outdated T -n+3 | awk '{print $1}' | xargs -n1 pip3 install -U --user