Skip to content

Instantly share code, notes, and snippets.

View KillerCodeMonkey's full-sized avatar
🐒

Bengt Weiße KillerCodeMonkey

🐒
View GitHub Profile
@KillerCodeMonkey
KillerCodeMonkey / NFC+IONIC
Created June 16, 2015 11:31
NFC in angular ionic app
<!-- used with <gap:plugin name="com.chariotsolutions.nfc.plugin" /> -->
<!DOCTYPE html>
<html ng-app="app">
<head>
<title>nfc - Test</title>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<meta charset="utf-8" />
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Style -->
@KillerCodeMonkey
KillerCodeMonkey / arch_vagrant
Created November 30, 2015 07:25
Get vagrant running on archlinux
# The provider 'virtualbox' that was requested to back the machine
# 'default' is reporting that it isn't usable on this system. The
# reason is shown below:
# VirtualBox is complaining that the kernel module is not loaded. Please
# run `VBoxManage --version` or open the VirtualBox GUI to see the error
# message which should contain instructions on how to fix this error.
sudo /sbin/vboxconfig
# There was an error while executing `VBoxManage`, a CLI used by Vagrant
@KillerCodeMonkey
KillerCodeMonkey / cleanDocker.sh
Created December 3, 2015 12:53
Clean up your docker
# remove all exited containers
docker rm -v $(docker ps -a -q -f status=exited)
# remove unused images
docker rmi $(docker images -f "dangling=true" -q)
# docker container that removes unwanted/unused volumes
docker run -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker:/var/lib/docker --rm martin/docker-cleanup-volumes
@KillerCodeMonkey
KillerCodeMonkey / elementSize.js
Created January 7, 2016 08:06
Angular directive to get size of an element
angular.module('app', ['ionic']).directive('elementSize', [
'$timeout',
function ($timeout) {
return {
restrict: 'A',
link: function (scope, element, attrs) {
element.ready(function () {
var height,
width;
$timeout(function () {
@KillerCodeMonkey
KillerCodeMonkey / gitHistory.sh
Created February 8, 2016 07:24
Get GitHistory
git log 1.1.1...1.1.2 --pretty=format:'* %s * view commit %H' | grep -v Merge
@KillerCodeMonkey
KillerCodeMonkey / sublime.conf
Last active April 1, 2016 19:47
Sublime Text 3 - Plugins & Config
Plugins:
========
AdvancedNewFile
AngularJS
Babel
BracketHighlighter
DocBlockr
Emmet
Git
GitGutter
@KillerCodeMonkey
KillerCodeMonkey / gitHistory.sh
Created February 22, 2016 07:11
generate GitHistory
git log 1.1.1...1.1.2 --pretty=format:'* %s * view commit %H' | grep -v Merge
@KillerCodeMonkey
KillerCodeMonkey / gitDeployBranch.sh
Created February 22, 2016 07:12
git deploy new branch
// get new release
git fetch --tags
git checkout -b <tagname> tags/<tagname>
// update existing tag
// switch branch before
git branch -d <tagname>
git fetch --tags
git checkout -b <tagname> tags/<tagname>
@KillerCodeMonkey
KillerCodeMonkey / gitTags.sh
Created February 22, 2016 07:13
working with tags
// create new tag
git tags -a <tagName>
git push --tags
// move tag to another commit
git tag -f -a <tagname>
git push -f --tags
// list tags
git tag -l
@KillerCodeMonkey
KillerCodeMonkey / gitRenameBranch.sh
Created February 22, 2016 07:14
git rename branch
git push origin origin/OLD_BRANCH:refs/heads/NEW_BRANCH && git push origin :OLD_BRANCH