Skip to content

Instantly share code, notes, and snippets.

View headmin's full-sized avatar

Henry Stamerjohann headmin

View GitHub Profile
@mr-rock
mr-rock / Gitosis on Snow Leopard Server
Created December 27, 2009 15:53
This is the steps I followed in order to install Gitosis on my Snow Leopard Server.
These are the things I did in order to have Gitosis installed and working on my Snow Leopard Server:
1. Install Git.
I use the installer for OS X provided by Google Code (http://git-osx-installer.googlecode.com/files/git-1.6.5.7-intel-leopard.dmg).
2. Install Gitosis
I got the Gitosis from the eagain.net server and I installed using Python bundled with Snow Leopard.
$ git clone git://eagain.net/gitosis.git
$ cd gitosis && python setup.py install
@bkyle
bkyle / NSArray+Globbing.h
Created February 3, 2010 20:02
NSArray+Globbing
#import <Foundation/Foundation.h>
@interface NSArray (Globbing)
+ (NSArray*) arrayWithFilesMatchingPattern: (NSString*) pattern inDirectory: (NSString*) directory;
@end
/*
asynctask.m -- sample code that shows how to implement asynchronous stdin, stdout & stderr streams for processing data with NSTask
compile with:
gcc -Wall -O3 -x objective-c -fobjc-exceptions -framework Foundation -o asynctask asynctask.m
./asynctask
./asynctask > asynctask-output.txt 2>&1
@josephholsten
josephholsten / fix_ovf.rb
Created November 1, 2011 23:34
Because no one actually implements a standard
#!/usr/bin/env ruby -w
# fix_ovf: convert virtualbox ovf documents to work with vmware
# Usage: fix_ovf < vbox.ovf > vmware.ovf
require 'nokogiri'
class OVFDocument < Nokogiri::XML::Document
XMLNS = {
'rasd' => "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData",
'vssd' => "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData",
@kylelemons
kylelemons / piping.go
Last active May 31, 2024 09:07 — forked from dagoof/piping.go
piping exec.Cmd in golang (example sorts all regular files under a directory by their extension)
package main
import (
"bytes"
"exec"
"log"
"os"
)
// Pipeline strings together the given exec.Cmd commands in a similar fashion
@rija
rija / install_puppet_mac.sh
Created February 23, 2012 23:04
Installing Puppet on Mac OS X
#!/usr/bin/env bash
set -o errtrace
set -o errexit
facter_version=$1
puppet_version=$2
target_volume=$3
#!/usr/local/bin/node
// ThisService node.js service script example, by Christian Eager
// Service type: Acts on input
//
// Node.js does *not* ship with OS X
// Download and installation instructions are available at http://nodejs.org
process.stdin.resume()
// Makes the data event emit a string instead of a Buffer
@olistik
olistik / gist:2627011
Last active August 12, 2021 06:39
Ubuntu 12.10 setup (rbenv/RVM, Janus, PostgreSQL)

Ubuntu 12.10 setup (rbenv/RVM, Janus, PostgreSQL)

Basic pre-requisites

  • Some utilities:
sudo apt-get install vim tmux git curl
  • Copy/paste from the command line:
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active June 5, 2024 22:16 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active July 24, 2024 15:28
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx