Skip to content

Instantly share code, notes, and snippets.

View gerrywastaken's full-sized avatar
🔎
🔬 🕺 🔒 🌎 👾

Gerry gerrywastaken

🔎
🔬 🕺 🔒 🌎 👾
View GitHub Profile
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
Index: sapi/cli/config.w32
===================================================================
--- sapi/cli/config.w32 (revision 308839)
+++ sapi/cli/config.w32 (working copy)
@@ -6,7 +6,8 @@
ARG_ENABLE('cli-win32', 'Build console-less CLI version of PHP', 'no');
if (PHP_CLI == "yes") {
- SAPI('cli', 'php_cli.c', 'php.exe');
+ SAPI('cli', 'php_cli.c php_http_parser.c php_cli_server.c', 'php.exe');
@jch
jch / .gemrc
Created November 1, 2011 19:10
gemrc example
# http://docs.rubygems.org/read/chapter/11
---
gem: --no-ri --no-rdoc
benchmark: false
verbose: true
update_sources: true
sources:
- http://gems.rubyforge.org/
- http://rubygems.org/
backtrace: true
@bhang
bhang / install_graphite_statsd_ubuntu_precise.sh
Created May 15, 2012 17:41
Install Graphite and statsd on Ubuntu 12.04 LTS (Precise Pangolin)
#!/bin/bash
# node.js using PPA (for statsd)
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
# Install git to get statsd
sudo apt-get install git
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active March 31, 2024 18:45 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@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:

@latentflip
latentflip / Instrumentor.coffee
Created October 27, 2012 12:21
Instrumentor
#depends on underscore
_.isConstructor = (thing) ->
if thing.name && thing.name[0].toUpperCase() == thing.name[0]
true
else
false
class Instrumentor
constructor: (namespace) ->
@nateware
nateware / gist:3997958
Created November 2, 2012 00:53
Cheat sheet to create auto-scaling group behind ELB
  1. Create the appropriate VPC that your application is going to live in. Create subnets for each availability zone you want to use.

  2. Create VPC security group(s) for your auto-scaling instances. For example, if you're going to auto-scale web servers, create a "web" VPC security group.

  3. Go into AWS console and create an ELB. Easy wizard. Select HTTP and (if needed) HTTPS. Make sure it's associated with the VPC you created in step 1.

  4. Create an auto-scaling launch configuration from the CLI. The launch configuration has the AMI, size, and security group from step #2. The security group must be by ID not name ("sg-12345"):

       as-create-launch-config web --image-id ami-2e31bf1e --instance-type m1.medium \
    

-g sg-7619041a --key root

@JeffreyWay
JeffreyWay / laravel4.md
Created November 19, 2012 16:37
Laravel 4 Thoughts/Questions/Etc.

Laravel 4 Thoughts/Questions/Etc.

This is just a random list of notes, as I dig into Laravel 4. If you have any feedback/solutions, please leave a comment. I'll be compiling everything for an article on Nettuts+, when the framework is officially in Beta. This will be updated over the course of the week.

  • Running composer dump-autoload after every new controller is a pain. Can this not be automated through artisan controller:make ControllerName?

  • Seems that some of the View HTML helpers are missing. No HTML::script().

  • Route::resource('tasks', 'TasksController') doesn't seem to create named routes. This is a big deal, if not. What's the solution?

@mipearson
mipearson / cookie_helper.rb
Last active July 26, 2018 04:06
Persist a paypal developer sandbox login over multiple cucumber & capybara & selenium runs.