Skip to content

Instantly share code, notes, and snippets.

View musically-ut's full-sized avatar
๐Ÿ™
๐Ÿข ๐ŸŽฃ ๐Ÿ 

Utkarsh Upadhyay musically-ut

๐Ÿ™
๐Ÿข ๐ŸŽฃ ๐Ÿ 
View GitHub Profile
@musically-ut
musically-ut / collective-deck-import.py
Created March 4, 2015 10:34
Process raw Wikipedia data and create Anki deck for collective nouns
import sys
import csv
###################################################################
# Handling inputs
###################################################################
def getInput(csvFileName):
with file(csvFileName) as f:
reader = csv.DictReader(f, fieldnames=['Subject', 'CollectiveNoun', 'Notes', 'Source'])
@csik
csik / gdrive_dl.py
Last active November 4, 2020 05:11
Download Large Files from Google Drive
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
"""API calls to download a very large google drive file. The drive API only allows downloading to ram
(unlike, say, the Requests library's streaming option) so the files has to be partially downloaded
and chunked. Authentication requires a google api key, and a local download of client_secrets.json
Thanks to Radek for the key functions: http://stackoverflow.com/questions/27617258/memoryerror-how-to-download-large-file-via-google-drive-sdk-using-python
"""
@iansltx
iansltx / _safari-iframe-cookie-workaround.md
Last active August 5, 2026 01:45
Safari iframe cookie workaround
@gibatronic
gibatronic / workit.bash
Last active May 19, 2026 08:46
Automatically run workon when entering a directory
function check_for_virtual_env {
[ -d .git ] || git rev-parse --git-dir &> /dev/null
if [ $? == 0 ]; then
local ENV_NAME=`basename \`pwd\``
if [ "${VIRTUAL_ENV##*/}" != $ENV_NAME ] && [ -e $WORKON_HOME/$ENV_NAME/bin/activate ]; then
workon $ENV_NAME && export CD_VIRTUAL_ENV=$ENV_NAME
fi
elif [ $CD_VIRTUAL_ENV ]; then
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@luizrabachini
luizrabachini / screen-share
Last active August 29, 2015 14:02 — forked from Saicheg/screenshare
A shell script to share desktop screenshots using Dropbox
#!/bin/bash
# ------------------------------------------------------------
# Automatic screenshot sharing integrated with Dropbox
# ------------------------------------------------------------
# Requirements:
# dropbox
# gnome-screenshot
# xclip
# ------------------------------------------------------------
echo 'install 8192cu /sbin/modprobe --ignore-install 8192cu; /bin/echo "0df6 0077" >| /sys/bus/usb/drivers/rtl8192cu/new_id' | sudo tee /etc/modprobe.d/8192cu.conf
sudo echo "8192cu" >> /etc/modules
@jondkinney
jondkinney / .vimrc
Created January 22, 2014 17:37
Ctags in Vim. Open in a new tab or a vertical split.
" open ctag in tab/vertical split
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
map <leader><C-\> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>
@XVilka
XVilka / TrueColour.md
Last active October 3, 2026 21:33
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!