Skip to content

Instantly share code, notes, and snippets.

View renemonroy's full-sized avatar

René Monroy renemonroy

  • Remote
View GitHub Profile
# prerequisites
install XCode
mate ~/.profile
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
. ~/.profile
# MacPorts
Download and install macports:
http://svn.macports.org/repository/macports/downloads/MacPorts-1.7.1/MacPorts-1.7.1-10.5-Leopard.dmg
sudo port selfupdate

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@renemonroy
renemonroy / tmux
Created May 27, 2013 16:46
Tmux-powerline theme
# Default Theme
if patched_font_in_use; then
TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="⮂"
TMUX_POWERLINE_SEPARATOR_LEFT_THIN="⮃"
TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="⮀"
TMUX_POWERLINE_SEPARATOR_RIGHT_THIN="⮁"
else
TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="◀"
TMUX_POWERLINE_SEPARATOR_LEFT_THIN="❮"
try {
module.$localStorage[key] = serializer(value);
} catch(e) {
if(e.name === 'QUOTA_EXCEEDED_ERR') {
// reset to make space
module.reset();
module.$localStorage[key] = serializer(value);
} else {
module.localStorageAvailable = false;
$log.error("Local storage write failure - " + e);
@renemonroy
renemonroy / install.md
Created November 28, 2013 00:09 — forked from svnlto/install.md

Setup new Mac with OSX Lion from scratch

These commands are good as of 2011-07-27.

Install Xcode 4

The download/install takes a while so start it first. When it finishes downloading you will still need to run it to complete installation.

Really the nicest choice for a terminal on OSX right now, especially with Lion style full screen support.

var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);

Objective-C Coding Convention and Best Practices

Most of these guidelines are to match Apple's documentation and community-accepted best practices. Some are derived some personal preference. This document aims to set a standard way of doing things so everyone can do things the same way. If there is something you are not particularly fond of, it is encouraged to do it anyway to be consistent with everyone else.

This document is mainly targeted toward iOS development, but definitely applies to Mac as well.

Operators

NSString *foo = @"bar";
/*
Learn the basics of Storekit with this example.
Before we can do anything in our app, we need to set up iTunesConnect! This process can be a little painful, but I will
guide you through it so you don't have to figure it out on your own.
Follow these steps:
1) Log in to your Apple Developer account at https://itunesconnect.apple.com/
2) Click "Manage Your Applications".
# 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/

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: