Skip to content

Instantly share code, notes, and snippets.

<article>
<header>
<h1 id="Willkommen">
<a href="#Willkommen" class="anchor_link">Willkommen</a>
</h1>
</header>
<section>
<h2 id="Überschrift">
<a href="#Überschrift" class="anchor_link">Überschrift</a>

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:
@fluxsaas
fluxsaas / gist:3980691
Created October 30, 2012 14:56
API For Creating Checkins
curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"checkin":{"device_token": "122","card_token": "12312", "timestamp": "2012-10-29T14:31:03"}}' http://checkin.easypep.de/checkins
@fluxsaas
fluxsaas / delete_account.rb
Created August 20, 2012 10:47
delete account without user
Account.all.each do |account|
if account.users.count == 0
account.destroy
end
end
@fluxsaas
fluxsaas / chef_solo_bootstrap.sh
Created June 2, 2012 08:22 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap Chef Solo
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install
@fluxsaas
fluxsaas / Intend selected text on tab
Created May 9, 2012 07:29
Some Sample Sublime Tipps
# Documentation
* http://www.sublimetext.com/docs/2/index.html
# Tutorials
* http://net.tutsplus.com/tutorials/tools-and-tips/sublime-text-2-tips-and-tricks/
# Example Settings File
# Preferences -> Settings - User
{
"font_size": 13.0,
@fluxsaas
fluxsaas / gist:1206102
Created September 9, 2011 12:38 — forked from lightyrs/gist:1108708
lion rails 3 setup
# 2011-07-25
#
# Mac OS X 10.7
# Xcode 4.1
# Install Lion.
# Xcode
# Download Xcode from Mac App Store.
class Controller
attr_accessor :timer
def startTimer(sender)
@timer = Timer.new
timerThread = NSThread.alloc.initWithTarget(@timer,
selector:'startTimer:',
object:'dummy_obj' )
timerThread.start
end
end
class Timer
attr_accessor :input
def startTimer(to_process)
@startTime = Time.now
interval = NSTimer.timerWithTimeInterval 0.1,
target: self,
selector: "update_timer:",
userInfo: nil,
repeats: true
NSRunLoop.currentRunLoop.addTimer(interval, forMode: NSDefaultRunLoopMode)
class Controller
attr_accessor :timer
def startTimer(sender)
@timer = Timer.new
timerThread = NSThread.alloc.initWithTarget(@timer,
selector:'startTimer:',
object:'dummy_obj' )
timerThread.start
end
end