Skip to content

Instantly share code, notes, and snippets.

View sdierauf's full-sized avatar

Stefan Dierauf sdierauf

View GitHub Profile
@sdierauf
sdierauf / gist:f0984b2e53eb373f5576
Created December 15, 2014 21:15
login-retrofit.js
// Drop this into gitlab/htdocs/app/assets/javascripts
// and it should be automatically merged into the minified js when assets are rebuilt
window.onready = function() {
// Convenient remove all method for an element
// Cleaner than elem.innerHTML = ""
Element.prototype.removeAll = function () {
while (this.firstChild) { this.removeChild(this.firstChild); }
return this;
@sdierauf
sdierauf / gist:1b0086ec5af3c53e1989
Created December 13, 2014 00:31
login-changer shim
//TODO: shim into gitlab/htdocs/assets/javascripts/application.js.coffee
// do this by making an escaped js function like
//
// hi = `<all the following code>`
//
// then add
//
// window.onready = ->
// hi()
//
4889200, 4889200
5026788, 9915988
6315707, 16231695
4841541, 34633049
4332848, 29791508
4535779, 25458660
0, 34633049
4469589, 39102638
4691186, 20922881
4719079, 43821717
function softRecurse(func) {
setTimeout(func, 0);
}
var fibonacci = (function() {
var sum = 0;
return {
calc : function(x) {
sum = 0;
this.calcHelper(x);
@sdierauf
sdierauf / LICENSE.txt
Last active August 29, 2015 14:06 — forked from addyosmani/README.md
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2014
Copyright (C) 2014 Addy Osmani @addyosmani
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Our shared joy of programming: https://www.youtube.com/watch?v=3_zW63dcZB0
The mess we're in: https://www.youtube.com/watch?v=lKXe3HUG2l4
Programming should eat itself: https://www.youtube.com/watch?v=SrKj4hYic5A
Inside the Wolfram Language: https://www.youtube.com/watch?v=EjCWdsrVcBM
Transducers: https://www.youtube.com/watch?v=6mTbuzafcII
By my analysis, when npm is started sudo root, it decides that it should install into /root, but then when it downgrades the user pemission to run node-gyp, node-gyp can't create its ~/.node-gyp folder for building. If npm is going to downgrade, then it should install into the user's home folder.
### Keybase proof
I hereby claim:
* I am sdierauf on github.
* I am sdierauf (https://keybase.io/sdierauf) on keybase.
* I have a public key whose fingerprint is 353F 0AD1 F895 1AF0 8BBB AE6E 7B50 695C D377 9C23
To claim this, I am signing this object: