This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
void fun(char *str) | |
{ | |
char buf[1024]; | |
strcpy(buf, str); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From http://brilliantcorners.org/2011/02/building-vim-on-osx-snow-leopard/ | |
# fetch the source into a vim directory | |
hg clone https://vim.googlecode.com/hg/ vim | |
cd vim | |
# make sure you're up to date | |
hg pull | |
hg update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uncrustify 0.59 | |
########################################################################### | |
# nah_xcode_uncrustify.rb default | |
# configuration | |
# | |
# config_version: 1.1.0 | |
# | |
# Default uncrustify config to use for | |
# the nah_xcode_uncrustify.rb script |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
########################################################################### | |
# Script to be called as an Xcode 4 behaviour which will attempt to | |
# uncrustify all source files in the open project. | |
# | |
# (c) Copyright 2012 David Wagner. | |
# | |
# Complain/commend: http://noiseandheat.com/ | |
# | |
#*************************************************************************# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Draw a 2px stroke line at the bottom of the the view. | |
- (void)drawRect:(CGRect)rect { | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGContextSetStrokeColorWithColor(context, [UIColor whiteColor].CGColor); | |
CGContextSetLineWidth(context, 2.0); | |
CGContextMoveToPoint(context, 0, CGRectGetMaxY(rect)); | |
CGContextAddLineToPoint(context, CGRectGetMaxX(rect), CGRectGetMaxY(rect)); | |
CGContextStrokePath(context); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Pad a UITextField View */ | |
UIView *paddingView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 20)]; | |
textfield1.leftView = paddingView; | |
textfield1.leftViewMode = UITextFieldViewModeAlways; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tar cvzf jenkins.tgz /var/lib/jenkins/ --exclude '/var/lib/jenkins/jobs/*/workspace/*' --exclude '/var/lib/jenkins/jobs/*/bundle/*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Care of @timgaleckas | |
CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline)" rbenv install 1.8.7-p352 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Chef Server Setup on Ubuntu/Debian | |
echo "deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main" | tee /etc/apt/sources.list.d/opscode.list | |
mkdir -p /etc/apt/trusted.gpg.d | |
gpg --keyserver keys.gnupg.net --recv-keys 83EF826A | |
gpg --export [email protected] | tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null | |
apt-get update | |
apt-get install opscode-keyring | |
apt-get upgrade |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Chef Server Setup on Ubuntu/Debian | |
echo "deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main" | tee /etc/apt/sources.list.d/opscode.list | |
mkdir -p /etc/apt/trusted.gpg.d | |
gpg --keyserver keys.gnupg.net --recv-keys 83EF826A | |
gpg --export [email protected] | tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null | |
apt-get update | |
apt-get install -y opscode-keyring | |
apt-get upgrade -y |