Skip to content

Instantly share code, notes, and snippets.

@eins78
eins78 / gut-das-an-nichts-gespart-wird.md
Last active August 29, 2015 13:57
Engangene Einnahmen durch Cannabisprohibition Deutschland 2012

@de-DE

Engangene Einnahmen durch Cannabisprohibition 2012

Wieviel Mehrwertsteuer hätte die BRD eingenommen, wenn die sichergestellte Menge Cannabis im Jahr 2012 zum Preis von 10€ pro Gramm verkauft worden wäre?

gras = 4942,0kg

@eins78
eins78 / unfix-navbar.css
Created April 25, 2014 15:37
unfix-navbar.css — für fefe <http://blog.fefe.de/?ts=adb04062>
nav, .navbar,
.navbar-fixed-top,
.navbar-fixed-bottom {
position: initial !important;
}
body {
padding: initial !important;
}
@eins78
eins78 / keybase.md
Created May 24, 2014 10:37
keybase.io proof

Keybase proof

I hereby claim:

  • I am eins78 on github.
  • I am mfa (https://keybase.io/mfa) on keybase.
  • I have a public key whose fingerprint is 79DC 7E64 39A8 1E18 A826 2C4F D10A 52BC 9651 13EA

To claim this, I am signing this object:

嬽ἒ
@eins78
eins78 / for_want_of_a_nail.md
Last active August 29, 2015 14:14
For Want of a Nail

"For Want of a Nail"

Info on Wikipedia

Original Poem:

For want of a nail the shoe was lost.
For want of a shoe the horse was lost.
For want of a horse the rider was lost.
For want of a rider the message was lost.

@eins78
eins78 / rails_error_classes.yaml
Created May 11, 2015 20:26
rails_error_classes.yaml
# class StandardError
# def descendants
# ObjectSpace.each_object(::Class).select {|klass| klass < self }
# end
# end
# puts (StandardError.descendants.map(&:to_s).sort.group_by {|s|s.split('::')[0]}).to_yaml
# output for <https://github.com/Madek/madek-webapp>:
---
@eins78
eins78 / index.js
Last active September 11, 2015 16:14
requirebin sketch
React = require('react')
curry = require('lodash/function/curry')
var List = React.createClass({
// this component expects a 'items' prop containing an array of strings
// we want to track here how often what was clicked
getInitialState: function(){
return {
items: this.props.items.map(function(item, index){
@eins78
eins78 / wtf.rb
Created September 14, 2015 12:37
rails controller instance var is cached if initialy assigned to const
class FooController < ApplicationController
KONST = {
foo: { bar: 'baz' },
}
def show
@konst = KONST
end
<?php
class CP_Calendar_Event_Handler extends CP_Custom_Content_Handler_Base
{
/**
* Registers the Calendar Event PostType
*
*/
public function on_setup_custom_content()
{
@eins78
eins78 / process-download.sh
Created January 14, 2012 13:03 — forked from pajp/README
Encode mkv files to Apple TV format and add them to iTunes
#!/bin/bash
# A script for re-encoding mkv files into something that iTunes and Apple TV
# likes. Suitable for calling from a Folder Action in order to automatically
# encode and add new downloaded movies.
# Requires HandBrakeCLI:
# http://handbrake.fr/downloads2.php
# Requires growlnotify (probably works without it):
# http://growl.info/extras.php