Skip to content

Instantly share code, notes, and snippets.

@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active October 18, 2024 23:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@hijonathan
hijonathan / instructions.markdown
Created October 4, 2012 19:58
Steps to transfer Chrome Custom Search Engines to Alfred

Step 0: Quit Chrome

Step 1: Get a dump of your search engines

> pwd
/Users/jonathankim/Desktop

> sqlite3 ~/Library/Application\ Support/Google/Chrome/Default/Web\ Data
sqlite3> .output chrome_export.sql

sqlite3> .dump keywords

@Nurdok
Nurdok / python_conversion.md
Last active July 11, 2024 15:00
Python Conversion

Python Number Conversion Chart

From To Expression
@leommoore
leommoore / node_file_paths.markdown
Last active August 19, 2024 13:02
Node - File Paths

#Node - File Paths

##File Paths Node has a path module which can be used to manipulate paths.

###Normalizing Paths Paths can be stored in different ways and it is neccessary to ensure that the path is standardized.

var path = require('path');
path.normalize('/foo/bar//baz/asdf/quux/..');
@lavelle
lavelle / git-cheat.md
Last active December 19, 2015 10:59
All the useful Git commands I've found (mostly from StackOverflow), in one convenient reference.

Branch from an old commit

git branch branchname ref

where ref is either a sha (abcd123) or a pointer HEAD@{5}

Undo a commit

git reset HEAD~1
@ingdir
ingdir / gist:0b211b9253c376f9cfa5
Last active December 3, 2023 11:47
BEM Cheatsheet

BEM Cheatsheet

BLOCK

Block encapsulates a standalone entity that is meaningful on its own.

While blocks can be nested and interact with each other, semantically they remain equal; there is no precedence or hierarchy.

Holistic entities without DOM representation (such as controllers or models) can be blocks as well.

@Zulko
Zulko / 3D_piano_from_midi.py
Last active April 9, 2024 05:51
Turn a piano MIDI file into a basic 3D animated piano video.
"""
Turn a piano MIDI file into a basic 3D animated piano video.
See the result here:
I am leaving it as a script because it is not tested on enough MIDI files yet.
Zulko 2014
This script is released under a Public Domain (Creative Commons 0) licence.
@lavelle
lavelle / convert-date-components.js
Last active February 15, 2018 22:13
Lodash Art Gallery
// Author: Giles
const datetimeComponents = _(matchResults).tail().map(_.toNumber).value();
// Better than
var datetimeComponents = _.map(
matchResults.slice(1, 6), // skip the matched result
function(component) {
return parseInt(component, 10);
}
);

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.