WHAT?
<?php
function machine_forget(&$data) {
$data = null;
}
$answer = 42;
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
WHAT?
<?php
function machine_forget(&$data) {
$data = null;
}
$answer = 42;
include: | |
# for backports | |
- apt | |
openssh6.6: | |
pkg.installed: | |
# backports; this number *will* change | |
- pkgs: | |
- openssh-server: 1:6.6p1-4~bpo70+1 | |
- openssh-client: 1:6.6p1-4~bpo70+1 |
#!/usr/bin/env python | |
import time | |
from sys import stdin, stdout, argv, exit | |
try: | |
if argv[1] == 'help' or argv[1] == '--help' or argv[1] == '-h': | |
print "%s: times each line of stdin." % argv[0] | |
print " Optional parameter is a float of a threshold. (defaults to 2.0)" | |
exit(255); |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
based on https://raw.githubusercontent.com/saltstack/salt/develop/tests/eventlisten.py | |
''' | |
# Import Python libs | |
from __future__ import print_function | |
import optparse |
var readline = require('readline'); | |
module.exports = readline; | |
readline.Interface.prototype.cursorToEnd = function() { | |
// place the cursor at the end of the current line | |
this.output.write( | |
'\x1b[0G\x1b[' + ( | |
this._promptLength + this.line.length | |
) + 'C' |
sarcasm:~/src/tmp$ cat repl.js | |
repl = require("repl"); | |
repl.start("testrepl> "); | |
sarcasm:~/src/tmp$ node repl.js | |
testrepl> 5+5 | |
10 | |
testrepl> sarcasm:~/src/tmp$ echo "5+5" | node repl.js | |
node.js:63 | |
throw e; |
browser | |
.chain | |
.session() | |
.and(function (browser) { | |
browser | |
.chain | |
.open('/') | |
.assertElementPresent('link=Log out') | |
.clickAndWait('link=Log out') | |
.assertElementPresent('link=Log in') |
browser | |
.chain | |
.session() | |
.and(function (browser) { // log out | |
try { | |
browser | |
.open('/') | |
.assertElementPresent('link=Log out') | |
.clickAndWait('link=Log out') | |
.assertElementPresent('link=Log in') |
var Step = require('./lib/step'); | |
Step( | |
function () { console.log("one"); }, | |
function () { console.log("two"); } | |
); |