Skip to content

Instantly share code, notes, and snippets.

View nayyarv's full-sized avatar

Varun Nayyar nayyarv

View GitHub Profile
@nayyarv
nayyarv / deliveroo.js
Last active January 23, 2020 02:50
Filter Deliveroo Restaurants
// ==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 / pip_upgrade.sh
Last active July 27, 2018 08:18
Pip upgrade skips external packages and continues in event of upgrade failure. Only user installs.
# 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
@nayyarv
nayyarv / cdf.sh
Created September 8, 2015 08:21
OS X bash: Change directory to front most finder window. Copy into .bashrc. Found on stackoverflow.
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
}