Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
#!/bin/sh | |
# Use socat to proxy git through an HTTP CONNECT firewall. | |
# Useful if you are trying to clone git:// from inside a company. | |
# Requires that the proxy allows CONNECT to port 9418. | |
# | |
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run | |
# chmod +x gitproxy | |
# git config --global core.gitproxy gitproxy | |
# | |
# More details at http://tinyurl.com/8xvpny |
#!/bin/bash | |
# | |
# Requires ftxdumperfuser from http://developer.apple.com/textfonts/download/ | |
# | |
# Usage: fixconsolas [files ...] | |
# When called with no arguments, it attempts to operate on every TrueType | |
# file in the current directory. | |
# | |
# References: | |
# http://bandes-storch.net/blog/2008/12/21/consolas-controlled/#comment-2042 |
xml2_sax_sample: xml2_sax_sample.c | |
gcc -o xml2_sax_sample `xml2-config --cflags --libs` xml2_sax_sample.c | |
clean: | |
rm xml2_sax_sample |
all: | |
gcc -g -std=c99 -o usbtiny_osx usbtiny_osx.m -framework Foundation -framework IOKit | |
clean: | |
rm -rf usbtiny_osx |
- (void)drawRect:(NSRect)rect | |
{ | |
// Drawing code here. | |
CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; | |
CGContextSetTextMatrix(context, CGAffineTransformIdentity); | |
NSAttributedString *str = [[NSAttributedString alloc ] | |
initWithString:@"学习 Core Text. Learning Core Text. 中华人民共和国。" | |
attributes:[NSDictionary dictionaryWithObjectsAndKeys:[NSFont fontWithName:@"Adobe Song Std" size:24.0f], (NSString *)kCTFontAttributeName, [NSNumber numberWithBool:YES], (NSString *)kCTVerticalFormsAttributeName, nil]]; | |
CFAttributedStringRef attrString = (CFAttributedStringRef)str; | |
CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString(attrString); |
install PostgreSQL 9 in Mac OSX via Homebrew | |
Mac OS X Snow Leopard | |
System Version: Mac OS X 10.6.5 | |
Kernel Version: Darwin 10.5.0 | |
Install notes for PostgreSQL 9.0.1 install using Homebrew: | |
sh-3.2# brew install postgresql |
#!/bin/bash | |
# | |
# Open new Terminal tabs from the command line | |
# | |
# Author: Justin Hileman (http://justinhileman.com) | |
# | |
# Installation: | |
# Add the following function to your `.bashrc` or `.bash_profile`, | |
# or save it somewhere (e.g. `~/.tab.bash`) and source it in `.bashrc` | |
# |
include $(GOROOT)/src/Make.inc | |
GOFMT=gofmt -spaces=true -tabindent=false -tabwidth=4 | |
all: | |
$(GC) jsontest.go | |
$(LD) -o jsontest.out jsontest.$O | |
format: | |
$(GOFMT) -w jsontest.go |
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
application: you-app-name-here | |
version: 1 | |
runtime: python | |
api_version: 1 | |
default_expiration: "30d" | |
handlers: | |
- url: /(.*\.(appcache|manifest)) | |
mime_type: text/cache-manifest |