Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/env node
var file = require(process.cwd()+'/package.json');
var pkg = JSON.parse(JSON.stringify(file));
var spawn = require('child_process').spawn;
if ( pkg.bugs.url ) {
spawn('open', [pkg.bugs.url]);
} else {
console.error("--------------------------------------");
@DerZyklop
DerZyklop / git-log.sh
Created August 15, 2014 13:19
This gives you pretty nice logs of your git project.
git log --pretty --graph --name-status --oneline
@DerZyklop
DerZyklop / colorful-git.sh
Created August 15, 2014 13:22
this draws colorful git output into your terminal.
git config --global color.ui true
@DerZyklop
DerZyklop / openVPNreconnect
Created August 29, 2014 14:08 — forked from aelveborn/vpn-status.sh
Synology DSM 5 VPN reconnection script.Save file to /usr/openVPNreconnect then run chmod +x /usr/openVPNreconnect. Schedule by following http://forum.synology.com/enu/viewtopic.php?f=241&t=65444
# Replace o1234567890 with your OpenVPN id. To get your id, start the VPN and run ps|grep client_o
# Replace YOUR_VPN_NAME with the name of your VPN profile in DSM 5 admin panel.
if echo `ifconfig tun0` | grep -q "00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00"
then
echo "VPN is running"
else
echo conf_id=o1234567890 > /usr/syno/etc/synovpnclient/vpnc_connecting
echo conf_name=YOUR_VPN_NAME >> /usr/syno/etc/synovpnclient/vpnc_connecting
echo proto=openvpn >> /usr/syno/etc/synovpnclient/vpnc_connecting
@DerZyklop
DerZyklop / gruntfile.coffee
Created September 3, 2014 07:49
A early version of my gruntfile for Kirby CMS.
module.exports = (grunt) ->
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks)
grunt.initConfig
# load content from the package.json
pkg: grunt.file.readJSON('package.json')
@DerZyklop
DerZyklop / keybase.md
Created September 4, 2014 23:04
Keybase.io proof

Keybase proof

I hereby claim:

  • I am derzyklop on github.
  • I am derzyklop (https://keybase.io/derzyklop) on keybase.
  • I have a public key whose fingerprint is 4C01 31CF 617C 754C CCAE B426 BBFA BBF8 9493 C258

To claim this, I am signing this object:

@DerZyklop
DerZyklop / piwik
Created September 13, 2014 21:12
Piwik install one-liner
wget http://builds.piwik.org/piwik.zip && unzip piwik.zip && rm piwik.zip && How\ to\ install\ Piwik.html
@DerZyklop
DerZyklop / contrib
Created September 17, 2014 12:04
Clean way of contributing to a git project.
github_project='[projectname]' # e.g. github_project='kirby'
project_creator_username = # e.g. github_project='getkirby'
my_username='DerZyklop'
git clone "https://github.com/$project_creator_username/$github_project"
# now click the "fork" button
git remote add "$my_username" "https://github.com/$my_username/$github_project"
git checkout -b [name of my new feature]
@DerZyklop
DerZyklop / git-grep-todo.md
Created October 2, 2014 09:32
grep TODOS from a git-project

Use

git grep -E "# TODO|// TODO"

or

git grep -El '# TODO|// TODO' | xargs -n1 git blame | grep $(git config user.name) | grep TODO

to get your todos from a git-project.

@DerZyklop
DerZyklop / deploy-openui5.sh
Last active August 29, 2015 14:07
Make an openui5-app work on android
sudo npm install -g cordova
brew install android-sdk -g
android
// Now the "Android SDK-Manager" GUI opens; download the preselected packages plus "Android 4.4.2 (API 19)"
brew cask install android-file-transfer
brew install ant -g
cordova create hello com.example.hello HelloWorld
cd hello