Skip to content

Instantly share code, notes, and snippets.

View mojoaxel's full-sized avatar
🏠
Working from home

Alexander Wunschik mojoaxel

🏠
Working from home
View GitHub Profile
/*
* Retina Images using Handlebars.js
*
* Created by [Makis Tracend](@tracend)
* Released under the [MIT license](http://makesites.org/licenses/MIT)
*
* Usage: <img src="{{retina 'http://mydoma.in/path/to/image.jpg'}}">
*/
Handlebars.registerHelper('retina', function( src ) {
@mojoaxel
mojoaxel / killall.sh
Created June 24, 2014 12:11
kill all processes containing the given string
#!/bin/bash
ps -ef | grep $1 | grep -v grep | awk '{print $2}' | xargs kill -9
@mojoaxel
mojoaxel / flot-events.time.html
Created June 18, 2015 12:12
flot-events example using time axes
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Flot-Events Example</title>
<!-- required -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js" ></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flot/0.8.3/jquery.flot.selection.min.js"></script>
@mojoaxel
mojoaxel / mobile-meta-links.html
Created January 9, 2012 21:35
iOS Web App Configuration
@mojoaxel
mojoaxel / nano_jsyntax_highlightning.sh
Last active December 10, 2015 04:28
Improve syntax-highlighting for the nano text editor
#!/bin/sh
### Improve syntax-highlighting for the nano editor.
### by mojoaxel <dev@wunschik.net>
### NOT TESTED YET!! USE WITH CARE!!
### http://www.if-not-true-then-false.com/2009/tuning-nano-text-editor-with-nanorc/
### download sytax setting for javascript
#!/bin/sh
## Node.js for Raspberry Pi Packaging Script
## =========================================
## Execute this script from within node.js git repo
## Use like this:
## ~/node/$ VERSION=v0.10.0 ./buildnode.sh
if [ -z $VERSION ]; then
echo "set the VERSION first"
exit 1
@mojoaxel
mojoaxel / server.js
Last active January 23, 2016 18:23
simple static node.js webserver
var http = require("http");
var url = require("url");
var fs = require("fs");
var port = process.argv[2] || 8080;
var contentTypes = {
'ico': 'image/x-icon',
'html': 'text/html',
'js': 'application/javascript',
'json': 'application/json',

Keybase proof

I hereby claim:

  • I am mojoaxel on github.
  • I am wunschik (https://keybase.io/wunschik) on keybase.
  • I have a public key whose fingerprint is 68D7 252B 3D5A 0C27 FA35 64E5 6B87 D9D3 813D AA42

To claim this, I am signing this object:

[
{"from": 1, "to": 2},
{"from": 1, "to": 3},
{"from": 2, "to": 4},
{"from": 2, "to": 5}
]