Skip to content

Instantly share code, notes, and snippets.

ttscoff / sizes.rb
Last active Jul 12, 2021
sizes: Calculate and sort all filesizes for current folder
View sizes.rb
#!/usr/bin/env ruby
# Sizes - Calculate and sort all filesizes for current folder Includes
# directory sizes, colorized output Brett Terpstra 2019 WTF License
VERSION = "1.0.1"
require 'shellwords'
# Just including term-ansicolor by @flori and avoiding all the
# rigamarole of requiring multiple files when it's not a gem... - Brett
paulirish /
Last active Sep 17, 2021
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$" "$extension_id%26uc" 
unzip -d "$extension_id-source" "$"

Thx to crxviewer for the magic download URL.

samaaron / Reich Phase - Overtone
Last active Dec 26, 2019
Steve Reich's Piano Phase - Sonic Pi vs Overtone
View Reich Phase - Overtone
(ns overtone.examples.compositions.piano-phase
;; Steve Reich's Piano Phase
(def piece [:E4 :F#4 :B4 :C#5 :D5 :F#4 :E4 :C#5 :B4 :F#4 :D5 :C#5])
(defn player
[t speed notes]
lambdamusic /
Last active Nov 30, 2020 archive statistics
kidpixo /
Last active Aug 26, 2021
Keyboard shortcuts for ipython notebook 3.1.0 / jupyter

Warning This is SEVERELY outdated, the current jupyter version is > 6.X, please refer to your current jupyter notebook installation!

Disclaimer : I just copied those shortcuts from Jupyter Menú > Help > Keyboard Shortcuts, I didn't wrote them myself.

Check your current shortcuts in your Help, shortcuts coule have been modified by extensions or your past self.


Keyboard shortcuts

wikier /
Last active Mar 29, 2018
SPARQLWrapper HTTP Digest Auth example
from SPARQLWrapper import SPARQLWrapper, JSON, DIGEST
sparql = SPARQLWrapper("")
sparql.setCredentials('login', 'password')
natelandau / .bash_profile
Last active Sep 11, 2021
Mac OSX Bash Profile
View .bash_profile
# ---------------------------------------------------------------------------
# Description: This file holds all my BASH configurations and aliases
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
eyaler / graph.json
Last active Jun 25, 2021
Force-Directed Graph with Drag/Zoom/Pan/Center/Resize/Labels/Shapes/Filter/Highlight
View graph.json
"graph": [],
"links": [
{"source": 0, "target": 1},
{"source": 0, "target": 2},
{"source": 0, "target": 3},
{"source": 0, "target": 4},
{"source": 0, "target": 5},
{"source": 0, "target": 6},
{"source": 1, "target": 3},
fperez / ProgrammaticNotebook.ipynb
Last active Sep 2, 2021
Creating an IPython Notebook programatically
View ProgrammaticNotebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
hvtuananh /
Created Feb 5, 2014
Python Unicode CSV Reader/Writer (fix writerow problem in Python docs)
import csv, codecs, cStringIO
class UTF8Recoder:
Iterator that reads an encoded stream and reencodes the input to UTF-8
def __init__(self, f, encoding):
self.reader = codecs.getreader(encoding)(f)