Skip to content

Instantly share code, notes, and snippets.

@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" 
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@scottymac
scottymac / gist:2512993
Created April 27, 2012 20:49
Bootstrap Variables
// Variables.less
// Variables to customize the look and feel of Bootstrap
// -----------------------------------------------------
// GLOBAL VALUES
// --------------------------------------------------
@davisford
davisford / editor.css
Created February 2, 2012 19:59
HTML/css/js editor using backbone.js, jquery-ui, and jsPlumb; jsPlumb endpoints are not behaving as expected here. They are transparent, and they do not drag along with their source or target.
body {
background-color:white; font-size:90%;
/*background-image:url(../images/dynamicAnchorBg.jpg); */
background-image:url(http://colourlovers.com.s3.amazonaws.com/images/patterns/222/222733.png?1221244242);
font-family:Helvetica;
height: 100%;
}
#editorCanvas {
position: absolute;
@bergie
bergie / .gitignore
Created September 19, 2011 15:50
Node.js email handling examples
config.json
reading-image.png
@madhums
madhums / mapreduce.js
Created August 3, 2011 20:33
mapreduce using mongodb and mongoose
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/db_name');
// map function
var map = function(){
emit(this.field_to_group_by, {
other_fields: this.other_fields
// list other fields like above to select them
})
}