Skip to content

Instantly share code, notes, and snippets.

View digitalkaoz's full-sized avatar

Robert Schönthal digitalkaoz

View GitHub Profile
Verifying that +digitalkaoz is my blockchain ID. https://onename.com/digitalkaoz
@digitalkaoz
digitalkaoz / cmake.out
Last active September 24, 2015 07:22
Cmake Error building ext-zmq
In file included from /tmp/php-zmq-master/ext_zmq.cpp:18:0:
/tmp/php-zmq-master/ext_zmq-private.h: In constructor 'HPHP::zmq::ZMQSocketData::ZMQSocketData(HPHP::zmq::ZMQContextData*, int64_t, bool)':
/tmp/php-zmq-master/ext_zmq-private.h:113:7: warning: 'HPHP::zmq::ZMQSocketData::pid' will be initialized after [-Wreorder]
int pid;
^
/tmp/php-zmq-master/ext_zmq-private.h:111:8: warning: 'bool HPHP::zmq::ZMQSocketData::is_persistent' [-Wreorder]
bool is_persistent;
^
/tmp/php-zmq-master/ext_zmq.cpp:279:1: warning: when initialized here [-Wreorder]
ZMQSocketData::ZMQSocketData(ZMQContextData* ctx, int64_t type, bool isPersistent)
@digitalkaoz
digitalkaoz / code.php
Created September 11, 2015 08:01
Symfony Closure Controller
<?php
$routes = new RouteCollection();
$controller = function(Request $request) {
return new Response('foo');
};
$route = new Route('/foo', ['_controller' => $controller]);
@digitalkaoz
digitalkaoz / App.ts
Created June 18, 2015 07:23
Angular with Typescript - the React-Component-Style way...
import angular = require('angular');
import ModuleA from './components/moduleA/index';
class App {
name = 'myapp';
selector = '[ng-app]';
private mod: angular.IModule;
@digitalkaoz
digitalkaoz / gulpfile.js
Created March 27, 2015 11:39
phpspec watcher with gulp
var gulp = require('gulp');
var shell = require('gulp-shell');
var plumber = require('gulp-plumber');
gulp.task('run', function() {
gulp.src('')
.pipe(plumber())
.pipe(shell('vendor/bin/phpspec run -fdot -v --stop-on-failure --ansi'))
;
});
@digitalkaoz
digitalkaoz / version.h
Last active August 29, 2015 14:13
travis hhvm version.h
#ifndef incl_HHVM_VERSION_H
#define incl_HHVM_VERSION_H
#include <boost/preprocessor/stringize.hpp>
#define HHVM_VERSION_MAJOR 3
#define HHVM_VERSION_MINOR 4
#define HHVM_VERSION_PATCH 0
#define HHVM_VERSION_SUFFIX ""
<?php
class EdmaParser implements Parser
{
const TYPE = 'EDMA attribute';
public function parse($source, array &$joins, array &$wheres, &$nos)
{
$attr = (int) $source['attribute'][$i];
$value = $source['valuei'][$i];
@digitalkaoz
digitalkaoz / default.vcl
Created October 14, 2014 13:47
sed problem
#backends should be injected here
director d1 round-robin {
}
@digitalkaoz
digitalkaoz / File.php
Last active August 29, 2015 14:07
serializer for external classes
<?php
// My/Ns/File
namespace My\Ns;
class File
{
}
@digitalkaoz
digitalkaoz / .bashrc
Created March 26, 2014 12:41
bashrc foo
#fetches a git branch from a repository
ps1_git_extra() {
branch=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
if [ -z "$branch" ] ; then return ; fi
local timeout=1
echo "[$branch$statmark]"
}
git_dirty() {
# check if we're in a git repo