Skip to content

Instantly share code, notes, and snippets.

View matthiasg's full-sized avatar

matthiasg matthiasg

View GitHub Profile
@matthiasg
matthiasg / index.html
Created August 31, 2012 08:19 — forked from anonymous/index.html
The bi-directional animation is done by using ~ sibling selectors. ps. WebKit only -> uses appearance:none; Cross-Browser version by @ryanseddon: http://jsfiddle.net/ryanseddon/FeJT2/
<input type="radio" name="name" checked />
<input type="radio" name="name" />
<input type="radio" name="name" />
<input type="radio" name="name" />
<input type="radio" name="name" />
@matthiasg
matthiasg / generate.sh
Created November 2, 2012 07:33
sign and verify
#!/bin/bash
ssh-keygen -f $1 -b 1022 -q
ssh-keygen -e -f $1.pub -m PEM > $1.pem

on the guest SmartOS VM

pkg_add http://pkgsrc.joyent.com/sdc6/2012Q1/i386/All/smtools
# note this is going to shut down the VM
sm-prepare-image

on the global zone

dataset=$(zfs list | grep data | awk '{print $1}')
sudo zfs set mountpoint=/data $dataset
sudo groupadd graphite
sudo useradd -c "Graphite User" -m -d /data/graphite -g graphite -s /bin/bash graphite
sudo pkgin up
sudo pkgin -y ug
sudo pkgin -y in gcc47
sudo pkgin -y in openldap-client
# shove this in ~/.chef/bootstrap/joyent-smartos.erb
# run knife bootstrap <hostname> -d joyent-smartos
bash -c '
if [ ! -f /opt/local/bin/chef-client ]; then
cd /tmp
pkgin install gcc-compiler gcc-runtime gcc-tools-0 ruby19 scmgit-base scmgit-docs gmake sun-jdk6
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz
tar -xzf rubygems-1.8.10.tgz
cd rubygems-1.8.10
# Licensed under CC BY 3.0 http://creativecommons.org/licenses/by/3.0/
# Derived works must attribute https://gist.github.com/4492300 at the beginning, and the date.
##########################################################
Installing and Configuring SmartOS on Hetzner (with a /29)
##########################################################
# if you find this gist useful, please star it
# thanks to: jamesog, linuxprofessor, ryancnelson for help with routing
#!/usr/bin/env python
"""
Math extension for Python-Markdown
Copied from http://freewisdom.org/projects/python-markdown/mdx_math for preservation.
The following description was attached by the author:
> This is a quick and dirty implementation of allowing <math> LaTeX </math> to do
var https = require("https");
var curaUrl = "https://packages.curasystems.com/packages/datepicker-for-angular?version=0.0.2";
var googleUrl = "https://google.de";
var options = {
strictSSL: false
};

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after

on the guest SmartOS VM

pkg_add http://pkgsrc.joyent.com/sdc6/2012Q1/i386/All/smtools
# note this is going to shut down the VM
sm-prepare-image

on the global zone