Skip to content

Instantly share code, notes, and snippets.

@DerZyklop
DerZyklop / brew-perms.sh
Created March 7, 2017 09:54 — forked from jaibeee/brew-perms.sh
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
@DerZyklop
DerZyklop / gist:4d71b0cc828b0f5fe5f4c88e237f2460
Created November 29, 2016 14:30
PlaceWorkers .profile für Server und ähnliches
# .profile written by Nils Neumann / neumann@placeworkers.com
# Cli Colors
export CLICOLOR=1
# use yellow for dir’s
export LSCOLORS=dxfxcxdxbxegedabagacad
# Shell prompt based on the Solarized Dark theme.
# Screenshot: http://i.imgur.com/EkEtphC.png
@DerZyklop
DerZyklop / singleton.js
Created November 24, 2016 13:47
JavaScript Singleton
var Singleton = (function () {
var instance;
function createInstance() {
var object = new Object("I am the instance");
return object;
}
return {
getInstance: function () {
@DerZyklop
DerZyklop / .eslint.json
Created November 15, 2016 14:56
Eslint file 2016-11
{
"plugins": [
"should-promised",
"no-unsafe-chars",
"filesize"
],
"rules": {
// Strict mode
"strict": 1,
@DerZyklop
DerZyklop / opa5-best-practices.js
Last active May 19, 2016 12:26
opa5-best-practices
// Do
strictEqual(
list.getItems().length,
expectedLength,
"List has expected amount of items"
);
// Don't
@DerZyklop
DerZyklop / function-declaration.js
Created May 17, 2016 16:40
function declaration
// Schlechter nachvollziebare trace-ausgaben im falle eines throw's:
someAjaxStuff(
function () {
console.log("Its working!");
},
function () {
console.log("Damn! :( ");
}
);
@DerZyklop
DerZyklop / gf-ff.sh
Last active April 5, 2016 20:09
Git Flow with Tagging and some console output
#!/bin/sh
echo "gf-ff $1"
if [[ $# -lt 1 ]]; then
echo "––––––––––––––––"
echo "USAGE: gf-ff [feature]"
echo "––––––––––––––––"
else
DEVELOPE_BRANCH=$(git config gitflow.branch.develop)
FEATURE_BRANCH=$(git config gitflow.prefix.feature)$1
@DerZyklop
DerZyklop / rotateBase64Image90Degree.js
Created February 3, 2016 10:34
rotateBase64Image90Degree()
function rotateBase64Image90Degree(base64data) {
var canvas = document.getElementById("c");
var ctx = canvas.getContext("2d");
var image = new Image();
image.src = base64data;
image.onload = function() {
canvas.width = image.height;
canvas.height = image.width;
ctx.rotate(90 * Math.PI / 180);
@DerZyklop
DerZyklop / coffeescript-comments-regex
Created April 15, 2015 10:10
regular expression for coffeescript comments
^([ ]*)#( [a-z,A-Z,0-9,üöä, ,":.'()->?`\[\]]*)
@DerZyklop
DerZyklop / .eslintrc
Created April 14, 2015 17:23
default .eslintrc
{
"ecmaFeatures": {},
"parser": "espree",
"env": {
"browser": false,
"node": false,
"amd": false,
"mocha": false,
"jasmine": false
},