Skip to content

Instantly share code, notes, and snippets.

Avatar

Max Albrecht eins78

View GitHub Profile
@eins78
eins78 / gut-das-an-nichts-gespart-wird.md
Last active Aug 29, 2015
Engangene Einnahmen durch Cannabisprohibition Deutschland 2012
View gut-das-an-nichts-gespart-wird.md

@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

View unfix-navbar.css
nav, .navbar,
.navbar-fixed-top,
.navbar-fixed-bottom {
position: initial !important;
}
body {
padding: initial !important;
}
@eins78
eins78 / keybase.md
Created May 24, 2014
keybase.io proof
View keybase.md

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 Aug 29, 2015
For Want of a Nail
View for_want_of_a_nail.md

"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
rails_error_classes.yaml
View 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 Sep 11, 2015
requirebin sketch
View index.js
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 Sep 14, 2015
rails controller instance var is cached if initialy assigned to const
View wtf.rb
class FooController < ApplicationController
KONST = {
foo: { bar: 'baz' },
}
def show
@konst = KONST
end
@eins78
eins78 / DisableAdobeUpdates.command
Created Sep 28, 2010
Disable updates from Adobe on Mac OS X
View DisableAdobeUpdates.command
echo "................................................................................" &&
echo "Hi! This will update 2 .plist files to disable Adobe Updates as recommended by" &&
echo "Adobe on http://kb2.adobe.com/cps/408/kb408711.html" &&
echo "and http://kb2.adobe.com/cps/404/kb404813.html." &&
echo "Therefore you have to enter your password here. Open this file in TextEdit to see for yourself if you don't trust me." &&
echo "................................................................................" &&
sudo defaults write /Library/Preferences/com.adobe.AdobeUpdater.Admin 'Disable.Update' -bool 'YES' &&
sudo defaults write /Library/Preferences/com.adobe.CSXSPreferences 'UpdatesAllowed' -string '0' &&
echo "Settings updated. Reboot and have fun."
echo "................................................................................"
View wp costum post type "event" sketch
<?php
class CP_Calendar_Event_Handler extends CP_Custom_Content_Handler_Base
{
/**
* Registers the Calendar Event PostType
*
*/
public function on_setup_custom_content()
{
You can’t perform that action at this time.