Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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

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:
<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>
<ol>
<li>Synchronisation mit Third Party Applications</li>
<li>Festes Einkommen für Mitarbeiter definierbar</li>
<li>Timer, Pausen und Gehaltsabrechnungen vor Änderungen schützen.</li>
</ol>
<div class="bs-callout bs-callout-danger">
<h4>Zeitplan und Weiterentwicklung</h4>
<p>
Die erste Beta-Phase startet am:
<strong>Fr. 23 August.</strong>
</p>
<p>
Zugänge versenden wir mit Hilfe unserers Email verteilers.
</p>
<p>
@fluxsaas
fluxsaas / redis.csv
Last active December 25, 2015 05:19
minuteman redis RAM
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
0 string mm:minuteman_public_site_2013-10-10 10:28 175116462 string 175116331 175116331
0 string mm:minuteman_public_site_2013-10-10 175116456 string 175116331 175116331
0 string mm:minuteman_public_site_2013-W40 175116454 string 175116331 175116331
0 string mm:minuteman_public_site_2013-10 175116453 string 175116331 175116331
0 string mm:minuteman_public_site_2013 175116450 string 175116331 175116331
0 string mm:minuteman_public_site_2013-10-10 10:26 175098019 string 175097888 175097888
0 string mm:minuteman_public_site_2013-10-10 09:35 174714418 string 174714287 174714287
0 string mm:minuteman_public_site_2013-10-10 09:00 174714418 string 174714287 174714287
0 string mm:minuteman_public_site_2013-10-10 09:34 174712246 string 174712115 174712115
0 string mm:minuteman_public_site_2013-10-10 08:00 174430773 string 174430642 174430642
@fluxsaas
fluxsaas / webhooks.txt
Created October 14, 2013 12:09
Fastbill Automatic Webhooks
mögliche Notifications:
-----------------------
- subscription.created
- subscription.changed
- subscription.canceled
@fluxsaas
fluxsaas / config.ru
Last active August 29, 2015 14:02
example proxy config.ru to foreward ajax request to different domain (CORS - workaround)
# Rack app to proxy ajax request to server on different domain (CORS).
# This is usefull if you have a rails-api and a backbone frontend on different domains
# and you want an easy solution to develop both apps on your local mashine with pow.
# Put this file in your backbone/angular/javascript folder.
# The assets should be in the ./public folder
# extend the REGEX to match a path you want to redirect.
# @redirect_regex = /\/api/