Skip to content

Instantly share code, notes, and snippets.

angular.module('sdk.directives.ccZippy')
.directive('ccZippy', function() {
var defaultIfUndefined = function(scope, property, defaultVal){
return scope[property] = scope[property] === undefined ? defaultVal : scope[property];
};
return {
restrict: 'E',
replace: true,
@cburgdorf
cburgdorf / gist:5594447
Last active December 17, 2015 10:28
special tag
git checkout master
git checkout temp
...jetzt alle files so organisieren wie sie seien sollen
git add -A
git commit -m "foo"
git tag foo
git branch -D temp
Im Prinzip ähnlich wie bei einer gh-pages branch. Da möchte man ja in der Regel nur den output aus dem dist verzeichnis auf der rooteben haben.
angular.module('sdk.directives.ccVariantSelector', []);
angular.module('sdk.directives.ccVariantSelector')
.filter('ccVariantFilter', ['$filter', function($filter) {
'use strict';
return function(values, selectedValues, key) {
var selected = {},
applyFilters = false;
var express = require("express");
var app = express();
var http = require("http");
var url = require('url');
var gunzip = require('zlib').createGunzip();
app.use(express.logger());
var http = require("http");
@cburgdorf
cburgdorf / gist:9713936
Last active March 3, 2020 00:42
A simple example of how to use async/await with hack-lang to perform non-blocking async tasks.
<?hh
async function helloAfter($name, $timeout) {
// sleep asynchronously -- let other async functions do their job
await SleepWaitHandle::create($timeout * 1000000);
echo sprintf("hello %s\n", $name);
}
async function run() {
$joe = helloAfter('Joe', 3);
* test
* test
* second level
* second level
* third level
* third level
@cburgdorf
cburgdorf / xor_keras.py
Last active November 18, 2020 11:23
Comparing XOR between tensorflow and keras
import numpy as np
from keras.models import Sequential
from keras.layers.core import Activation, Dense
training_data = np.array([[0,0],[0,1],[1,0],[1,1]], "float32")
target_data = np.array([[0],[1],[1],[0]], "float32")
model = Sequential()
model.add(Dense(32, input_dim=2, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
@cburgdorf
cburgdorf / gist:ae20bea3f3407a3efa86a73483c01fba
Created October 18, 2017 14:21
/usr/share/X11/xorg.conf.d/51-synaptics-userdefined.conf
Section "InputClass"
Identifier "touchpad restrict area"
Driver "synaptics"
MatchIsTouchpad "on"
Option "AreaLeftEdge" "200"
Option "AreaRightEdge" "1000"
EndSection

Keybase proof

I hereby claim:

  • I am cburgdorf on github.
  • I am cburgdorf (https://keybase.io/cburgdorf) on keybase.
  • I have a public key ASDmnJw9apcdSgFJkT9fnasYfMH-Ba1F2ugDbWgPefxnfwo

To claim this, I am signing this object:

$ grep -r -C5 0x1003 ~/.local/share/trinity/mainnet/logs/
/home/cburgdorf/.local/share/trinity/mainnet/logs/trinity.log- DEBUG 07-11 12:53:06 peer Disconnecting from remote peer; reason: useless_peer
/home/cburgdorf/.local/share/trinity/mainnet/logs/trinity.log- DEBUG 07-11 12:53:06 peer Could not complete handshake with <Node(0x288b97262895b1c7ec61cf314c2e2004407d0a5dc77566877aad1f2a36659c8b698f4b56fd06c4a0c0bf007b4cfb3e7122d907da3b005fa90e724441902eb19e@149.202.183.162:30303)>: HandshakeFailure('ETHPeer <Node([email protected])> network (90513) does not match ours (1), disconnecting',)
/home/cburgdorf/.local/share/trinity/mainnet/logs/trinity.log- DEBUG 07-11 12:53:07 peer Could not complete handshake with <Node(0x3381d485d267ac823f3e6e5abbd14e239c901ec78c2be48d44ff4742a62b83c1c0d650553cab116ce3464afa21dc42f5d635353d44191fbdbf1cb700e61a9a0b@165.227.69.122:30303)>: HandshakeFailure('ETHPeer <Node([email protected])> disconnected before completing handshake: too_many_