Skip to content

Instantly share code, notes, and snippets.

View alexander-heimbuch's full-sized avatar
🤔

Alexander Heimbuch alexander-heimbuch

🤔
View GitHub Profile
@alexander-heimbuch
alexander-heimbuch / patch.sh
Created December 1, 2015 09:01
Useful Git Commands
#!/bin/bash
# source: http://tosbourn.com/using-git-to-create-an-archive-of-changed-files/
git archive -o update.zip HEAD $(git diff --name-only HEAD^)
@alexander-heimbuch
alexander-heimbuch / cheatsheet.md
Created October 30, 2015 18:51
Docker Cheatsheet

Docker Cheat Sheet

Erzeugung von Images

Vorkonfigurierte Container über Docker Registry

Nutzung des docker repos

docker pull myuser/myapp

@alexander-heimbuch
alexander-heimbuch / 1_modi.md
Created October 30, 2015 18:51
Vi(m) Chetsheet

Modi

Modus verlassen: ESC + ESC

Visueller Zeilenmodus: V
Visueller Modus: v
Visueller Blockmodus: ctrl + v
Einfügemodus vor dem aktuellen Zeichen: i
Einfügemodus nach dem aktuellen Zeichen: a
Einfügemodus mit neuer Zeile danach: o

@alexander-heimbuch
alexander-heimbuch / MVC.md
Created October 30, 2015 18:47
Development Patterns

Objective

  • Model View Controller pattern
  • Improved application organisation through a seperation of concerns
  • Explicit seperation from application logic from the user interface
  • Easier maintenance because the structure determines where changes have to be made
  • Decoupling data storage and visualization that enables a better unit testing
  • Avoid duplication of low level model and controllers
  • In JavaScript enforced by frameworks like Backbone, Ember.js or JavaScriptMVC
@alexander-heimbuch
alexander-heimbuch / is_array.js
Last active December 23, 2015 09:46
Check if is Array
/**
* Check if is Array
*/
Object.prototype.isArray = function () {
if(Object.prototype.toString.call(this) === '[object Array]') {
return true;
}
return false;
@alexander-heimbuch
alexander-heimbuch / hashmap.js
Last active October 22, 2015 13:47
Example Hashmap
var hashTable = function () {
// Task: Hashtable for every filetype
var hashCode = function (value) {
var hash = 0, i, chr, len;
value = value.toString();
if (value.length === 0) {
return hash;
}