Skip to content

Instantly share code, notes, and snippets.

View hSATAC's full-sized avatar
🐈
Cataholic

Ash Wu hSATAC

🐈
Cataholic
View GitHub Profile
@Abizern
Abizern / git versioner
Created October 12, 2009 23:05
Xcode build script that adds the commit sha to the CFBundleVersion
#!/usr/bin/env ruby
# Xcode auto-versioning script for Subversion by Axel Andersson
# Updated for git by Marcus S. Zarra and Matt Long
# Converted to ruby by Abizer Nasir
# Appends the git sha to the version number set in Xcode.
# see http://www.stompy.org/2008/08/14/xcode-and-git-another-build-script/ for more details
# These are the common places where git is installed.
# Change this if your path isn't here
@fguillen
fguillen / git_tips.md
Created December 19, 2010 20:53
Git Tips

(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )

Git tips

Global git user

git config --global user.name "Fernando Guillen"
git config --global user.email "fguillen.mail+spam@gmail.com"

Repository git user

cd /develop/myrepo

@keimlink
keimlink / gist:831633
Created February 17, 2011 12:37
Startup script for the Supervisor server (RHEL)
#!/bin/bash
#
# Startup script for the Supervisor server
#
# Tested with Red Hat Enterprise Linux Server release 5.5
#
# chkconfig: 2345 85 15
# description: Supervisor is a client/server system that allows its users to \
# monitor and control a number of processes on UNIX-like \
# operating systems.
@noahcampbell
noahcampbell / Installing Haskell and Cabal on CentOS 5.4.md
Created March 31, 2011 18:25
How to install Haskel and Cabal on CentOS 5.4 given the versions of glibc and the version of linux.

Adopted from this post

Install libedit

sudo yum install libtermcap-devel
export LIBEDIT_VERSION=0.3
curl -LOk http://jaist.dl.sourceforge.net/sourceforge/libedit/libedit-$LIBEDIT_VERSION.tar.gz
tar -zxf libedit-0.3.tar.gz
cd libedit

CFLAGS='-g -O2 -fPIC' ./configure --prefix=/usr

@remi
remi / commit-msg
Created August 30, 2011 20:56
Git commit message spell check hook (kind of a proof of concept, but still usable)
#!/usr/bin/env ruby
# 1. Install hunspell
# $ brew install hunspell
# 2. Download a dictionary and install it in a path listed by `hunspell -D`
# $ open http://wiki.services.openoffice.org/wiki/Dictionaries
# 3. Move this file into your repository
# $ mv commit-msg /path/to/repo/.git/hooks
@pithyless
pithyless / gist:1208841
Created September 10, 2011 21:49
Install Python 2.7 (homebrew + pip + virtualenv) on Mac OS X Lion

Install Python

$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7

Symlinks...

@sgk
sgk / trac2down.py
Created October 14, 2011 09:35
Trac Wiki to Markdown converter
#!/usr/bin/python
# vim:set fileencoding=utf-8 sw=2 ai:
import sqlite3
import datetime
import re
SQL = '''
select
name, version, time, author, text
/*!
*
* Imgur CORS Image upload
*
* Author & Copyright: timdream (timdream@gmail.com; http://timdream.org/)
* License: MIT LICENSE
*
*/
"use strict";
@hSATAC
hSATAC / USAGE.md
Created November 15, 2011 07:03 — forked from kossnocorp/USAGE.md
MacVim with Drawer compile manual

Clone & Build

curl https://gist.github.com/raw/970438/caff9a09ed2d223b1123a69ede17cb19ad352af9/build.sh | sh
@nerab
nerab / mail2kindle.md
Created November 30, 2011 21:12
Send eBooks to a Kindle from the MacOS command line
  1. Install msmtp, a simple sendmail stand-in that sends mail via a relay host (which is what you want, in almost all cases):

     brew install msmtp --with-macosx-keyring
    

    The flag with-macosx-keyring will make msmtp use the MacOS keychain, which is a pretty secure way to keep your mail account password secure.

  2. Configure it as described in this article. Don't use the manual installation method described there, Homebrew (which we used in step 1) is way more convenient.

  3. Have mail use msmtp instead of sendmail by creating .mailrc with the following content (or adding it, it the file already exists):