Skip to content

Instantly share code, notes, and snippets.

@denisdefreyne
denisdefreyne / .zshrc
Created December 4, 2015 09:18
My zsh configuration
#!/usr/bin/env zsh
source ~/.profile
source ~/.zshrc-local
########## ZSH STUFF
autoload -U colors && colors
########## HISTORY
@florapdx
florapdx / Customize Bash Prompt
Last active December 14, 2015 01:58
How-to for customizing your bash prompt. For PyLadies tutorial on the CLI. You can also find this in a slightly more readable form on the PyLadies PDX meetup site under "Pages".
Customize Your Bash Prompt
Your bash prompt comes with a standard command prompt with a default setting something like “PS1="\u@\h \w>” in your .bash_profile or .profile (if you are using OSX) that translates to something like this:
UserName YourComputerName DirectoryName $
While useful, this is kind of boring and doesn’t give us very much information about the environment we’re working in. So let’s customize our prompts!
@assafmo
assafmo / couchimport-jq-json-zip.sh
Last active March 16, 2022 23:42
Import an archive full of JSONs into CouchDB
#!/bin/bash
#json per line (same result, but for example can use jq to set _id)
7z x -so $1 | jq -c . | couchimport --db mydb --type jsonl
@jasongilman
jasongilman / atom_clojure_setup.md
Last active January 11, 2024 09:13
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

@paulirish
paulirish / bling.js
Last active April 20, 2024 17:39
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs