Skip to content

Instantly share code, notes, and snippets.

View raphaelstolt's full-sized avatar
:octocat:
Focusing.

Raphael Stolt raphaelstolt

:octocat:
Focusing.
View GitHub Profile
#!/usr/bin/tclsh8.5
#
# Usage: unmerged branch1 branch2
proc getlog branch {
lrange [split [exec git log $branch --oneline] "\n"] 0 100
}
proc diff {title c1 c2} {
puts "\n$title"
@molily
molily / apps-berlin-js.md
Last active October 7, 2015 19:48
Slides of the apps.berlin.js meetups

The apps.berlin.js meetup

apps.berlin.js is a Berlin.js spin-off with a special focus on JavaScript-driven web applications (“HTML5 apps”), desktop browser apps as well as mobile apps and games written in JavaScript. Here you can find the slides and additional links of all past talks. Please fork this Gist to add more info!

First meetup on May 10th 2012

<?php
class Foo {
public $bar;
function __construct($bar)
{
$this->bar = $bar;
}
}
@igorw
igorw / import_sql.php
Last active December 16, 2015 12:29
Using symfony/console's ArgvInput standalone.
<?php
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
$input = new ArgvInput($argv, new InputDefinition([
new InputArgument('sql', InputArgument::REQUIRED),
new InputOption('update', 'u', InputOption::VALUE_NONE),
@jakelazaroff
jakelazaroff / require_module.js
Last active December 20, 2015 12:29
RequireJS module example. This is how I keep my dependency list organized!
define([
// models
'models/someModel', 'models/someOtherModel',
// collections
'collections/someCollection',
// views
'views/someView', 'views/someOtherView',
// templates
'text!templates/someTemplate.html', 'text!templates/someOtherTemplate.html',
@asciidisco
asciidisco / pubsub_with_requirejs_backbone.js
Created October 31, 2012 11:26
PubSub with requirejs & backbone
// PubSub impl. with require.js & backbone.js
// events.js
define(['underscore', 'backbone'], function (_, Backbone) {
'use strict';
var events = {};
_.extend(events, Backbone.Events);
return events;
});
@jakzal
jakzal / FindPackageListsCommand.php
Created January 16, 2014 14:19
How to spec a Symfony2 console command?
<?php
namespace Zalas\Bundle\PackagistBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class FindPackageListsCommand extends ContainerAwareCommand
@aaronblohowiak
aaronblohowiak / gist:3932768
Created October 22, 2012 17:23
RedisConf Notes Part I
Redisconf Notes:
"We will begin this morning with a performance"
"Is this a key store..." Bohemian Rhapsody Key/Value Store ballad. Epic Win!
"Any way the data flows doesn't really matter to me... flushdb..."
"Lua killed a db by writing after calling a nondeterministic function..."
"Got to leave SQL behind and face the truth..."
"Redis, I don't want to join, sometimes I wish I'd never described a query..."
"The ZSET has some data set aside for me, for me, for MEEEEEEE"
@pithyless
pithyless / gist:1208841
Created September 10, 2011 21:49
Install Python 2.7 (homebrew + pip + virtualenv) on Mac OS X Lion

Install Python

$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7

Symlinks...

@Ocramius
Ocramius / find-missing-return-types.php
Last active September 5, 2018 10:27
Script to find classes/interfaces/traits with missing return types: ADD THEM TO YOUR SHIT.
<?php
require_once __DIR__ . '/vendor/autoload.php';
$namespace = 'PutYourProjectNamespaceHere\\';
foreach (new RegexIterator(new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__ . '/src')), '/^.+\.php$/i', RecursiveRegexIterator::GET_MATCH) as $file) {
require_once $file[0];
}