Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am henrikbjorn on github.
  • I am hb (https://keybase.io/hb) on keybase.
  • I have a public key ASAtO3zhZUFMsCm6ZDEVELjwCqTDNoNxDjs3Lf3Avtd-BAo

To claim this, I am signing this object:

@henrikbjorn
henrikbjorn / phpunit.watchr
Created August 17, 2011 13:33
Save this in your project root and launch with the watchr gem `watchr phpunit.watchr`. This will now watch every test file for all bundles in src for changes and if a change is found it will run `phpunit -c app changedfile`
$ gem install watchr
$ cd /path/to/symfony-project
$ wget https://raw.github.com/gist/1151531/f12b125fed843086c05377d4f76185797121cbc6/phpunit.watchr
$ watchr phpunit.watchr
@henrikbjorn
henrikbjorn / webpack.config.js
Created January 8, 2016 10:20
WebPack config for bundling js and css files using modulish require.
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
entry : "./src/index.jsx",
output : {
path : "dist",
filename: "bundle.js"
},
module: {
loaders: [
<?php
/**
* Simple SocketServer that runs over the udp protocol. The run method takes a callable
* which is called with the data received.
*
* @package Socket
*/
class SocketServer
{
@henrikbjorn
henrikbjorn / CodeCoverage.php
Created November 7, 2012 11:52
CodeCoverage for PHPSpec2
<?php
namespace Vandpibe\PHPSpec\Extension;
use PHPSpec2\ServiceContainer;
use PHP_CodeCoverage;
use PHP_CodeCoverage_Report_HTML;
class CodeCoverage implements \PHPSpec2\Extension\ExtensionInterface
{
require 'formula'
class Zsh < Formula
homepage 'http://www.zsh.org/'
url 'https://github.com/zsh-users/zsh/zipball/zsh-5.0.0'
md5 '70d3322829e5eca007cb83a14c1d4b4e'
depends_on 'gdbm'
depends_on 'pcre'
{
"minimum-stability" : "beta",
"require" : {
"symfony/symfony" : "2.0.*",
"doctrine/orm" : "2.3.0-BETA1 as 2.2.3",
"doctrine/common" : "2.3.0-BETA1 as 2.2.3",
"doctrine/dbal" : "2.3.0-BETA1 as 2.2.3"
}
}
@henrikbjorn
henrikbjorn / gist:2952885
Created June 19, 2012 07:55
What is it that isnt working :S
Interval Since Last Panic Report: 23250 sec
Panics Since Last Report: 1
Anonymous UUID: 3727230E-B9B5-4520-8799-3F278D74FAE8
Tue Jun 19 09:53:53 2012
panic(cpu 2 caller 0xffffff7f8275bcaf): NVRM[0/1:0:0]: Read Error 0x00104008: CFG 0xffffffff 0xffffffff 0xffffffff, BAR0 0xd2000000 0xffffff8115ab6000 0x0a5480a2, D0, P3/4
Backtrace (CPU 2), Frame : Return Address
0xffffff80f2debac0 : 0xffffff8001e1d636
0xffffff80f2debb30 : 0xffffff7f8275bcaf
0xffffff80f2debbc0 : 0xffffff7f828555e3
{
"repositories": {
"packagist" : false,
"Stampie": {
"vcs": {
"url": "git://github.com/henrikbjorn/Stampie.git"
}
}
},
"require" : {
$('#table_0 table tr:neq(0)').each(function() { console.log($(this).find('td:eq(2)').text()) })