Skip to content

Instantly share code, notes, and snippets.

View hSATAC's full-sized avatar
🐈
Cataholic

Ash Wu hSATAC

🐈
Cataholic
View GitHub Profile
@hSATAC
hSATAC / git_tips.md
Created April 30, 2011 08:06 — forked from fguillen/git_tips.md
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

/*!
*
* 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
@hSATAC
hSATAC / git versioner
Created May 25, 2012 04:35 — forked from Abizern/git versioner
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
@hSATAC
hSATAC / mountain-lion-brew-setup.markdown
Created July 31, 2012 09:20 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

@hSATAC
hSATAC / gist:3754899
Created September 20, 2012 09:28 — forked from keimlink/gist:831633
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.
@hSATAC
hSATAC / gemspec-usage.md
Created November 5, 2012 06:10 — forked from holman/gemspec-usage.md
test/spec/mini

Just install this in your apps like so:

gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'

import urllib, urllib2, json
class FacebookTestUserManager:
'''
A tool which helps to create and delete test account for
Facebook.
See https://developers.facebook.com/docs/test_users/
'''
#import <Foundation/Foundation.h>
@interface ZBFacebookTestUserManager : NSObject
- (id)initWithAppID:(NSString *)inAppID appSecret:(NSString *)inAppSecret;
- (NSDictionary *)createTestAccountWithName:(NSString *)inUsername error:(NSError **)outError;
- (BOOL)deleteTestAccountWithUserID:(NSString *)inUserID error:(NSError **)outError;
@property (readonly) NSString *appID;
@property (readonly) NSString *appSecret;

Changes:

  • this version includes backport of Greg Price's patch for speedup startup http://bugs.ruby-lang.org/issues/7158 .

    ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.

  • this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.

    This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.