-
Open a browser
# start an instance of firefox with selenium-webdriver $browser_type = 'firefox' $host = 'http://localhost:4444/wd/hub'
$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);
const test = require('tape'); | |
const koa = require('koa'); | |
const supertest = require('supertest'); | |
const app = koa(); | |
app.use(function *(){ | |
this.body = 'Hello World'; | |
}); |
#!/bin/bash | |
# Following the guide found at this page | |
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html | |
echo "\r\nUpdating system ...\r\n" | |
sudo apt-get update | |
# Create folder to place selenium in |
Angular doesn’t depend on jQuery. In fact, the Angular source contains an embedded lightweight alternative: jqLite. Still, when Angular detects the presence of a jQuery version in your page, it uses that full jQuery implementation in lieu of jqLite. One direct way in which this manifests itself is with Angular’s element abstraction. For example, in a directive you get access to the element that the directive applies to:
dispatch:beforeDispatchLoop | |
dispatch:beforeDispatch | |
dispatch:beforeNotFoundAction | |
dispatch:beforeExecuteRoute | |
dispatch:afterInitialize | |
dispatch:afterExecuteRoute | |
dispatch:afterDispatch | |
dispatch:afterDispatchLoop | |
dispatch:beforeException |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> | |
<input type="hidden" name="business" value="[Your Secure Merchant ID]" > | |
<input type="hidden" name="cmd" value="_donations" > | |
<input type="hidden" name="item_name" value="[Donation Description]" > | |
<input type="hidden" name="return" value="http://yourdomain.com/thank-you" > | |
<div> | |
<label for="amount">Donation Amount:</label> | |
<input name="amount" type="text" id="amount" > | |
</div> | |
<input name="submit" type="submit" value="Donate" > |
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |