Skip to content

Instantly share code, notes, and snippets.

DerZyklop

Block or report user

Report or block DerZyklop

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@DerZyklop
DerZyklop / gist:4d71b0cc828b0f5fe5f4c88e237f2460
Created Nov 29, 2016
PlaceWorkers .profile für Server und ähnliches
View gist:4d71b0cc828b0f5fe5f4c88e237f2460
# .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 Nov 24, 2016
JavaScript Singleton
View singleton.js
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 Nov 15, 2016
Eslint file 2016-11
View .eslint.json
{
"plugins": [
"should-promised",
"no-unsafe-chars",
"filesize"
],
"rules": {
// Strict mode
"strict": 1,
@DerZyklop
DerZyklop / opa5-best-practices.js
Last active May 19, 2016
opa5-best-practices
View opa5-best-practices.js
// Do
strictEqual(
list.getItems().length,
expectedLength,
"List has expected amount of items"
);
// Don't
View function-declaration.js
// 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 Apr 5, 2016
Git Flow with Tagging and some console output
View gf-ff.sh
#!/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
View rotateBase64Image90Degree.js
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 Apr 15, 2015
regular expression for coffeescript comments
View coffeescript-comments-regex
^([ ]*)#( [a-z,A-Z,0-9,üöä, ,":.'()->?`\[\]]*)
@DerZyklop
DerZyklop / .eslintrc
Created Apr 14, 2015
default .eslintrc
View .eslintrc
{
"ecmaFeatures": {},
"parser": "espree",
"env": {
"browser": false,
"node": false,
"amd": false,
"mocha": false,
"jasmine": false
},
@DerZyklop
DerZyklop / older-node.sh
Last active Aug 29, 2015
brew install specific version of node
View older-node.sh
# Get an older version of node
cd /usr/local
brew versions node
git checkout 51dbf0b Library/Formula/node.rb # If you e.g. want version 0.10.31
brew install node
# Get an older version of npm
npm install -g npm@1.4.27
You can’t perform that action at this time.