Skip to content

Instantly share code, notes, and snippets.

View adduser-osx
#!/bin/sh
#
# Copyright (c) 2002-2004 Michael Telahun Makonnen. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
@tvon
tvon / freeciv.net-bootstrap.sh
Created Mar 7, 2011
A script to bootstrap (and build) freeciv.net on Ubuntu 10.10
View freeciv.net-bootstrap.sh
#!/bin/bash
basedir="${HOME}/freeciv-build"
srcdir="${basedir}/freeciv-web"
destdir="${basedir}/build"
# User will need permissions to create a database
mysql_user="root"
mysql_pass="changeme"
@tvon
tvon / homebrew-macvim.sh
Created Apr 8, 2011
Use homebrew installation of macvim for terminal vim command.
View homebrew-macvim.sh
if [ -x `which brew` ]; then
macvim_version=`brew list --versions macvim | sed 's/.* \([0-9\.\-]*\)$/\1/'`
if [ -n "${macvim_version}" ]; then
alias vim=`brew --prefix`/Cellar/macvim/${macvim_version}/MacVim.app/Contents/MacOS/Vim
fi
fi
@tvon
tvon / pow.sh
Created Apr 8, 2011
"pow" shell function for quick linking of directories to ~/.pow (if using http://pow.cx)
View pow.sh
function pow {
if [ -d "`cd $1; pwd`" ]; then
ln -s "`cd $1; pwd`" ~/.pow/
fi
}
@tvon
tvon / raw-client.rb
Created Aug 29, 2011
raw api file upload
View raw-client.rb
#!/usr/bin/env ruby
require "net/http"
require "uri"
url = 'http://example.com/submissions.json'
token = 'TOKEN HERE'
boundary = "pop-pop"
uri = URI.parse(url)
@tvon
tvon / puppet.log
Created Oct 30, 2015
hq-vagrant manager debug
View puppet.log
2015-10-30 17:51:41 +0000 Puppet (err): Unable to set ownership to puppet:puppet for log file: /vagrant/puppet.log
2015-10-30 17:51:41 +0000 Puppet (debug): Runtime environment: puppet_version=4.2.1, ruby_version=2.1.6, run_mode=user, default_encoding=UTF-8
2015-10-30 17:51:41 +0000 Puppet (debug): Evicting cache entry for environment 'vagrant'
2015-10-30 17:51:41 +0000 Puppet (debug): Caching environment 'vagrant' (ttl = 0 sec)
2015-10-30 17:51:41 +0000 Puppet (debug): Evicting cache entry for environment 'vagrant'
2015-10-30 17:51:41 +0000 Puppet (debug): Caching environment 'vagrant' (ttl = 0 sec)
2015-10-30 17:51:41 +0000 Puppet (debug): Loading external facts from /opt/puppetlabs/puppet/cache/facts.d
2015-10-30 17:51:41 +0000 Puppet (info): Loading facts
2015-10-30 17:51:41 +0000 Puppet (debug): Loading facts from /tmp/vagrant-puppet/environments/vagrant/modules/apt/lib/facter/apt_reboot_required.rb
2015-10-30 17:51:41 +0000 Puppet (debug): Loading facts from /tmp/vagrant-puppet/environments/vagrant/modu
@tvon
tvon / init.vim
Created Nov 2, 2015
neovim init
View init.vim
" https://github.com/junegunn/vim-plug
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:plug_window = 'botright new | resize 10'
call plug#begin('~/.config/nvim/plugged')
"Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rails'
Plug 'tpope/vim-jdaddy'
Plug 'tpope/vim-repeat'
View gist:4978516
[UIView transitionWithView:self.view
duration:0.25
options:UIViewAnimationOptionsTransitionCrossDissolve
animations:^{
[self.view addSubview:overlay];
}
completion:nil];
View install.log
cp /usr/local/share/boot2docker/boot2docker.iso ^[]4;0;rgb:18/18/18^[\^[]4;1;rgb:ab/46/42^[\^[]4;2;rgb:a1/b5/6c^[\^[]4;3;rgb:f7/ca/88^[\^[]4;4;rgb:7c/af/c2^[\^[]4;5;rgb:ba/8b/af
^[\^[]4;6;rgb:86/c1/b9^[\^[]4;7;rgb:d8/d8/d8^[\^[]4;8;rgb:58/58/58^[\^[]4;9;rgb:ab/46/42^[\^[]4;10;rgb:a1/b5/6c^[\^[]4;11;rgb:f7/ca/88^[\^[]4;12;rgb:7c/af/c2^[\^[]4;13;rgb:ba/8b/af^[\^[]4;14;rgb:86/c1/b9^
[\^[]4;15;rgb:f8/f8/f8^[\^[]4;16;rgb:dc/96/56^[\^[]4;17;rgb:a1/69/46^[\^[]4;18;rgb:28/28/28^[\^[]4;19;rgb:38/38/38^[\^[]4;20;rgb:b8/b8/b8^[\^[]4;21;rgb:e8/e8/e8^[\^[]10;rgb:d8/d8/d8^[\^[]11;rgb:18/18/18^[
\^[]12;rgb:d8/d8/d8^[\/Users/tvon/.docker/machine/cache/boot2docker.iso
@tvon
tvon / moby.sh
Last active Dec 15, 2015
Concatenate header files from frameworks in the iOS 6.1 SDK, as described in Mark Dalrymple's talk on headers.
View moby.sh
#!/bin/bash
OUTDIR=~/Desktop/moby
BASE="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks"
mkdir -p ${OUTDIR}
cd ${BASE}
for dir in *
do