Skip to content

Instantly share code, notes, and snippets.

@statianzo
statianzo / jade.vim
Created November 20, 2010 03:51
Jade syntax highlighting for vim
" Vim syntax file
" Language: Jade
" Filenames: *.jade
" Ported from tvim-haml - https://github.com/tpope/vim-haml
" For use with Jade - http://jade-lang.com/
" Now maintained at: https://github.com/statianzo/vim-jade
if exists("b:current_syntax")
finish
endif
@thrashr888
thrashr888 / dColors.class.php
Created January 26, 2011 19:09
My class that I used to produce and convert color values.
<?php
class dColors{
CONST WHITE = "#FFFFFF";
CONST BLACK = "#000000";
CONST RED = "#FF0000";
CONST GREEN = "#00FF00";
CONST BLUE = "#0000FF";
@bowsersenior
bowsersenior / stooge_loader.rb
Created May 18, 2011 23:18
A demo of YAML anchors, references and nested values
require 'rubygems'
require 'yaml'
# A demonstration of YAML anchors, references and handling of nested values
# For more info, see:
# http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/
stooges = YAML::load( File.read('stooges.yml') )
# => {
# "default" => {
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@blazarecki
blazarecki / PopupDictionary.php
Last active November 10, 2021 15:54
Alert, confirm and prompt with mink
<?php
namespace Widop\Mink\Extension;
/**
* Dictionary to manage popups.
*
* @author Benjamin Lazarecki <benjamin.lazarecki@gmail.com>
*/
trait PopupDictionary
@docteurklein
docteurklein / gist:5064805
Created March 1, 2013 13:53
failing test case for ReflectionMethod::getPrototype() when a class is using a trait that defines a method, chich class extends another class that defines the same method too.
<?php
trait TestTrait
{
public function getKernel()
{
}
}
class BaseTest
@callado4
callado4 / behat-phantomjs-webdriver.md
Last active January 24, 2021 17:10
Instructions on how to make behat (with mink) use the phantomjs webdriver to run headless browser tests

Making behat use phantomjs for the tests

If you want to run it on phantomjs (a headless browser) you can add this profile to your behat.yml and you need phantomjs >= 1.8.0

phantomjs:
    extensions:
        Behat\MinkExtension\Extension:
            base_url: http://dev.local
            goutte: ~
            selenium2:
 wd_host: "http://localhost:8643/wd/hub" 
@jakzal
jakzal / selenium.sh
Last active February 16, 2018 17:32
Selenium grid runner
#!/bin/sh
command=${1:-"help"}
SELENIUM_VERSION="2.39.0"
NODE_OPTIONS="-browser browserName=phantomjs"
download() {
[ -f selenium-server-standalone.jar ] || wget http://selenium.googlecode.com/files/selenium-server-standalone-${SELENIUM_VERSION}.jar -Oselenium-server-standalone.jar
}
@efcasado
efcasado / eqc.md
Last active December 16, 2023 00:07
A gentle introduction to (Erlang) QuickCheck

Erlang QuickCheck

What is QuickCheck?

QuickCheck is a language for stating properties of programs.

?FORALL(X, nat(), X*X >= 0)
@npryce
npryce / Makefile
Created December 16, 2016 13:33
Pandoc Makefile example
MARKDOWN_SRC:=$(shell find doc -name '*.md')
DIAGRAM_SRC:=$(shell find doc -name '*.plantuml')
MARKDOWN_FORMAT=markdown+fenced_code_blocks+fenced_code_attributes+grid_tables+footnotes
# Order is significant when multiple CSS files
CSS_SRC:=styles/style.css
SITE_HTML=$(MARKDOWN_SRC:doc/%.md=out/site/%.html) $(DIAGRAM_SRC:doc/%.plantuml=out/site/%.png)
SITE_CSS=$(CSS_SRC:styles/%=out/site/%)