Skip to content

Instantly share code, notes, and snippets.

View manuelkiessling's full-sized avatar

Manuel Kießling manuelkiessling

View GitHub Profile
<?php
abstract class cCommandLineTool implements cCommandLineToolInterface extends cTool {
const TYPE_DECLARED = 0;
const TYPE_BOOLEAN = 1;
private $sCronjobTitle = NULL;
private $sCronjobDescription = NULL;
private $aArguments = array();
@manuelkiessling
manuelkiessling / gist:800520
Created January 28, 2011 16:39
Ruby class layout allowing a funny call combination
class Foo
def calculate_for_events(events)
@events = events
self
end
def between(time)
@start_time = time
self
<!DOCTYPE html>
<html>
<head>
<link href="css/default.css"
rel="stylesheet"
type="text/css"
media="screen, projection" />
require 'spec_helper'
describe SharesController do
render_views
describe '#create' do
it "should redirect to Login if user is not logged in" do
post :create, :share => { :facebook_id => 'abc', :address_id => 7 }
response.should redirect_to login_path
@manuelkiessling
manuelkiessling / gist:1662418
Created January 23, 2012 10:42
Symfony issue #3124
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# Netzwerkbrücke mhdev VM (bestehender Stack)
config.vm.define :mhdev do |mhdev_config|
mhdev_config.vm.network :bridged, :mac => "0800275e32c0"
end
end
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Konfiguration mhdev VM (bestehender Stack)
config.vm.define :mhdev do |mhdev_config|
INFO environment: Loading configuration...
DEBUG loader: Set :default = "/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.2/config/default.rb"
DEBUG loader: Populating proc cache for "/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.2/config/default.rb"
DEBUG loader: Load procs for pathname: #<Pathname:/Applications/Vagrant/embedded/gems/gems/vagrant-1.0.2/config/default.rb>
DEBUG loader: Set :home = #<Pathname:/Users/manuel/.vagrant.d/Vagrantfile>
DEBUG loader: Populating proc cache for #<Pathname:/Users/manuel/.vagrant.d/Vagrantfile>
DEBUG loader: Load procs for pathname: #<Pathname:/Users/manuel/.vagrant.d/Vagrantfile>
DEBUG loader: Set :root = #<Pathname:/Users/manuel/vagrant-dev/Vagrantfile>
DEBUG loader: Populating proc cache for #<Pathname:/Users/manuel/vagrant-dev/Vagrantfile>
DEBUG loader: Load procs for pathname: #<Pathname:/Users/manuel/vagrant-dev/Vagrantfile>
(defn m
"Measures the number of consonant sequences between
the start of word and position j. If c is a consonant
sequence and v a vowel sequence, and <...> indicates
arbitrary presence,
<c><v> -> 0
<c>vc<v> -> 1
<c>vcvc<v> -> 2
<c>vcvcvc<v> -> 3
...
@manuelkiessling
manuelkiessling / no_pointers.go
Created August 7, 2012 11:06
Go map with pointers to structs / with structs
package webservice
import (
"io"
"io/ioutil"
"net/http"
"encoding/json"
"github.com/bmizerany/pat"
"manuel.kiessling.net/multivariate/runner/types"
// "fmt"