Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# pushover api
APP_TOKEN=""
USER_KEY=""
DEVICE=""
# apple pay country code
CC="DE"
@ds82
ds82 / mtr.log
Created September 13, 2018 12:56
Start: 2018-09-13T14:54:51+0200
HOST: kip-imac.or.lan Loss% Snt Last Avg Best Wrst StDev
1.|-- fb.or.lan 0.0% 10 7.9 5.4 0.4 7.9 2.0
2.|-- 62.155.246.134 0.0% 10 5.0 6.5 4.7 10.9 2.1
3.|-- 217.239.51.26 0.0% 10 7.3 7.4 6.5 9.4 0.9
4.|-- 62.157.250.38 0.0% 10 7.9 7.8 7.1 9.7 0.8
5.|-- ae10.milano58.mil.seabone.net 0.0% 10 21.9 25.0 16.5 32.3 5.1
6.|-- cloudflare.milano58.mil.seabone.net 50.0% 10 33.4 33.8 33.0 34.6 0.6
7.|-- 104.16.27.35 60.0% 10 33.5 34.0 33.5 34.2 0.3
Start: 2018-09-13T14:55:08+0200
@ds82
ds82 / karma.conf.js
Created June 28, 2016 14:23
karma config
'use strict';
var aliasify = require('aliasify');
var makeAliasifyConfig = require('./aliasify.js');
var aliasifyConfig = makeAliasifyConfig();
aliasifyConfig.aliases['rea.templates'] = './tests/fixtures/rea-templates.js';
var stringify = require('stringify');
var stringifyConfig = require('./stringify');
@ds82
ds82 / .gitconfig.user
Last active November 5, 2015 09:37
some of my git aliases
branch-start = "!f() { git log $1 --reverse --ancestry-path $(git merge-base $1 HEAD)..HEAD --pretty=%H | head -n1; }; f"
branch-end = "!f() { git log $1 --ancestry-path $(git merge-base $1 HEAD)..HEAD --pretty=%H | head -n1; }; f"
merge-commit = "!f() { FROM=$(git branch-start $1 | cut -c1-6); TO=$(git branch-end $1 | cut -c1-6); git merge --ff-only $1; git commit --allow-empty -m \"merge ${1} ${FROM}..${TO}\"; }; f"
## csm = commit submodule with changes
csm = "!f() { git reset $1; HEAD=$(git diff --ignore-submodules=dirty --submodule=log $1 | head -n1 | sed -e 's/^Submodule //g' -e 's/:$//g'); TAIL=$(git diff --ignore-submodules=dirty --submodule=log $1 | tail -n +2 | sed -e 's/$/ /g'); git add -A $1 && git commit -m \"${HEAD}\" -m \"${TAIL}\"; }; f"
branch-name = "!git rev-parse --abbrev-ref HEAD"
last-branch-name = "!f() { echo $(git rev-parse --symbolic-full-name @{-1} | sed -e 's/refs\\/heads\\///' ); }; f"
@ds82
ds82 / gerrit-add-changeId
Created June 24, 2015 08:54
gerrit change-id hinzufügen (OSX/zsh)
tmp=$(mktemp /tmp/commit-msg.XXXX)
hook=$(stat -f $(git rev-parse --git-dir))/hooks/commit-msg
git filter-branch -f --msg-filter "cat > $tmp; \"$hook\" $tmp; cat $tmp" START..END
@ds82
ds82 / gist:72ef893136b102df502d
Created April 9, 2015 05:49
Remove old/unused linux kernels in debian/ubuntu
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

Keybase proof

I hereby claim:

  • I am ds82 on github.
  • I am ds82 (https://keybase.io/ds82) on keybase.
  • I have a public key whose fingerprint is B0EC 363A 0C93 7FA7 0767 37E8 E038 A35D 1D8C 3AD6

To claim this, I am signing this object:

@ds82
ds82 / gist:e9aac5b9c1d1fd1955e1
Last active August 29, 2015 14:02
Alias for fast & consistent commits of git submodule's in parent repo
[alias]
csm = ! sh -c 'pushd $0 >/dev/null && REV=$(git rev-parse HEAD|cut -c1-7) && popd && git add -A $0 && git commit -m \"submodule $0 -> $REV\"'
@ds82
ds82 / frameworks
Created April 10, 2014 06:27
Frameworks, Libs, etc ..
### Server
| Name | Bereich | URL |
| ------------- | -------------- | ---------------------------------------------------------------------------- |
| nodejs | runtime | [http://nodejs.org/](http://nodejs.org/) |
| express | lib/framework | [http://expressjs.com/](http://expressjs.com/) |
| socket.io | lib/framework | [http://socket.io/](http://socket.io/) |
| node-ffi | lib/framework | [https://github.com/rbranson/node-ffi](https://github.com/rbranson/node-ffi) |
| gulp | build-tool | [http://gulpjs.com/](http://gulpjs.com/) |
| jasmine | unit-tests | [http://jasmine.github.io/](http://jasmine.github.io/) |
@ds82
ds82 / gist:6719683
Last active December 24, 2015 00:49
My personal AngularJS Developing Guidelines

Angular App Guidelines

Controller

  • Controllers are named like SomeCtrl, SomeEditCtrl, etc..
  • Controllers of the same Domain are specified in the same file (unless they become to big)

Resource

  • Resources are called SomeResource and defined as a factory