Skip to content

Instantly share code, notes, and snippets.

View btipling's full-sized avatar
:shipit:
shipping code

btipling

:shipit:
shipping code
  • ConductorOne
  • Bay Area, California
  • 08:46 (UTC -12:00)
View GitHub Profile
@franciscoadasme
franciscoadasme / gist:1008620
Created June 5, 2011 03:40
How to show a custom title bar icon in NSWindow
// Force to show a titlebar icon
[window setRepresentedURL:[NSURL URLWithString:@"WindowTitle"]];
// Set our custom icon
[[window standardWindowButton:NSWindowDocumentIconButton] setImage:[NSImage imageNamed:@"imagename"]];
...
// Implement window delegate method to prevent to popup document (which do not exist) path menu when cmd+clicked
- (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu
{
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@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/
@johan
johan / dnd.js
Created November 25, 2011 06:55 — forked from johan/index.html
Spinny Globe with drag-and-drop-geojson-file support
// http://www.html5rocks.com/en/tutorials/file/dndfiles/
d3.select('svg')
.on('dragover', handleDragOver)
.on('drop', handleFileSelect)
;
function handleFileSelect() {
var event = d3.event
, files = event.dataTransfer.files // FileList object
, about = []
@ilyabo
ilyabo / index.html
Created March 26, 2012 19:57
Flows of refugees between the world countries in 2008
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script>
<style type="text/css">
svg {
border:1px solid gray
}
#countries path {
@jboner
jboner / latency.txt
Last active June 2, 2024 14:49
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@jasondavies
jasondavies / README.md
Created September 24, 2012 23:13 — forked from mbostock/.block
LineString Cutting
@Nurdok
Nurdok / python_conversion.md
Last active December 16, 2022 03:45
Python Conversion

Python Number Conversion Chart

From To Expression
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 17, 2024 02:53
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: