Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
# Compile nginx standalone without root access | |
mkdir ~/installed | |
mkdir ~/installed/nginx | |
mkdir ~/src | |
cd ~/src | |
# PCRE dependency - we'll compile against this statically | |
wget http://kent.dl.sourceforge.net/sourceforge/pcre/pcre-7.8.tar.gz | |
tar -xzvf pcre-7.8.tar.gz |
#import "SXPointSpriteGroup.h" | |
@implementation SXPointSpriteGroup | |
@synthesize texture; | |
- (id)initWithTexture:(SPTexture*)t andNumSprites:(int)amount{ | |
self = [super init]; | |
numPointSprites = amount; | |
self.texture = t; | |
[self reset]; |
// | |
// UIFont+DahDit.m | |
// DahDit | |
// | |
// Created by Erik Andersson on 2011-07-28. | |
// Copyright 2011 Åva gymnasium. All rights reserved. | |
// | |
#import "UIFont+DahDit.h" |
[alias] | |
l50 = "!f () { git log --abbrev-commit --date=short --pretty=format:'%h%x00%cd%x00%s%x00%an%x00%d' $@ | gawk -F '\\0' '{ printf \"\\033[31m%s\\033[0m \\033[32m%s\\033[0m %-50s \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{49}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5 }' | less -R; }; f" | |
l80 = "!f () { git log --abbrev-commit --date=short --pretty=format:'%h%x00%cd%x00%s%x00%an%x00%d' $@ | gawk -F '\\0' '{ printf \"\\033[31m%s\\033[0m \\033[32m%s\\033[0m %-80s \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{79}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5 }' | less -R; }; f" | |
lg50 = "!f () { git log --graph --color=always --abbrev-commit --date=relative --pretty=format:'%x00%h%x00%s%x00%cd%x00%an%x00%d' $@ | gawk -F '\\0' '{ printf \"%s\\033[31m%s\\033[0m %-50s \\033[32m%14s\\033[0m \\033[30;1m%s\\033[0m\\033[33m%s\\n\", $1, $2, gensub(/(.{49}).{2,}/, \"\\\\1…\",\"g\",$3), $4, $5, $6 }' | less -R; }; f" | |
lg80 = "!f () { git log --graph --color=always --abbrev-commit --date=re |
#!/bin/bash | |
mpg123 -C \ | |
http://scfire-mtc-aa04.stream.aol.com:80/stream/1005/?smoothjazz \ | |
http://ice.somafm.com/secretagent \ | |
http://ice.somafm.com/groovesalad \ | |
http://ice.somafm.com/covers \ | |
http://ice.somafm.com/lush \ | |
http://ice.somafm.com/indiepop \ | |
http://ice.somafm.com/bootliquor \ | |
http://ice.somafm.com/suburbsofgoa \ |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
- (UIImage*) maskImage:(UIImage *)im withMask:(UIImage *)maskImage { | |
CGImageRef maskRef = maskImage.CGImage; | |
CGImageRef mask = CGImageMaskCreate(CGImageGetWidth(maskRef), | |
CGImageGetHeight(maskRef), | |
CGImageGetBitsPerComponent(maskRef), | |
CGImageGetBitsPerPixel(maskRef), | |
CGImageGetBytesPerRow(maskRef), | |
CGImageGetDataProvider(maskRef), NULL, false); |
chmod +x *.sh
./nginx-start.sh
// | |
// RSTimingFunction.h | |
// | |
// Created by Raphael Schaad on 2013-09-28. | |
// This is free and unencumbered software released into the public domain. | |
// | |
#import <UIKit/UIKit.h> |
CGFloat ScaleToAspectFitRectInRect(CGRect rfit, CGRect rtarget) | |
{ | |
// first try to match width | |
CGFloat s = CGRectGetWidth(rtarget) / CGRectGetWidth(rfit); | |
// if we scale the height to make the widths equal, does it still fit? | |
if (CGRectGetHeight(rfit) * s <= CGRectGetHeight(rtarget)) { | |
return s; | |
} | |
// no, match height instead | |
return CGRectGetHeight(rtarget) / CGRectGetHeight(rfit); |