Skip to content

Instantly share code, notes, and snippets.

git fetch origin master
git checkout -b main origin/master --no-track
git push origin main
git remote set-head origin main
gh api -XPATCH "repos/:owner/:repo" -f default_branch="main"
git push --delete origin master
git branch -d master
#!ipxe
set base-url http://stable.release.core-os.net/amd64-usr/current
kernel ${base-url}/coreos_production_pxe.vmlinuz initrd=coreos_production_pxe_image.cpio.gz
initrd ${base-url}/coreos_production_pxe_image.cpio.gz
boot
$ brew upgrade php56
==> Upgrading 1 outdated package, with result:
php56 5.6.8
==> Upgrading php56
==> Downloading https://www.php.net/get/php-5.6.8.tar.bz2/from/this/mirror
curl: (60) SSL certificate problem: Invalid certificate chain
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"

Keybase proof

I hereby claim:

  • I am swestcott on github.
  • I am swestcott (https://keybase.io/swestcott) on keybase.
  • I have a public key whose fingerprint is 17EC 4D56 26E5 745D AF62 62DA 4492 8641 2442 4477

To claim this, I am signing this object:

Scanning dependencies of target double-conversion
[ 0%] Building CXX object hphp/third_party/double-conversion/CMakeFiles/double-conversion.dir/src/bignum-dtoa.cc.o
[ 0%] Building CXX object hphp/third_party/double-conversion/CMakeFiles/double-conversion.dir/src/bignum.cc.o
[ 0%] Building CXX object hphp/third_party/double-conversion/CMakeFiles/double-conversion.dir/src/cached-powers.cc.o
[ 0%] Building CXX object hphp/third_party/double-conversion/CMakeFiles/double-conversion.dir/src/diy-fp.cc.o
[ 0%] Building CXX object hphp/third_party/double-conversion/CMakeFiles/double-conversion.dir/src/double-conversion.cc.o
[ 0%] Building CXX object hphp/third_party/double-conversion/CMakeFiles/double-conversion.dir/src/fast-dtoa.cc.o
[ 0%] Building CXX object hphp/third_party/double-conversion/CMakeFiles/double-conversion.dir/src/fixed-dtoa.cc.o
[ 0%] Building CXX object hphp/third_party/double-conversion/CMakeFiles/double-conversion.dir/src/strtod.cc.o
Linking CXX static library libdouble-conversion.a
var lazy = require("lazy"),
fs = require("fs");
new lazy(fs.createReadStream('./data.txt'))
.lines
.forEach(function(line) {
console.log(line.toString());
}
);
$ bin/behat
Feature: Simple Calculator
Scenario: Addition # features/SimpleCalculator.feature:3
[2013-02-03 16:33:34] FeatureContext.INFO: Initialised calculator ["stdClass"] []
Given I have a calculator # FeatureContext::iHaveACalculator()
[2013-02-03 16:33:34] AdditionContext.INFO: Adding values ["2","3"] []
When I add together "2" and "3" # AdditionContext::iAddTogetherAnd()
[2013-02-03 16:33:34] FeatureContext.INFO: Asserting expected result "5" equals "5" [] []
Then the result should be "5" # FeatureContext::theResultShouldBe()
@swestcott
swestcott / gist:3172927
Created July 24, 2012 21:55
Behat Multi Session - Use Chat Room
<?php
/**
* @When /^"([^"]*)" posts a message$/
*/
public function postsAMessage($user)
{
// Ensure message is unique
$this->message = 'Selenium Test ' . microtime(true);
$this->getSession($user)->getPage()->fillField("chat", $this->message);
@swestcott
swestcott / gist:3172857
Created July 24, 2012 21:42
Behat Multi Session - Enter Chat Room
<?php
/**
* @Given /^"([^"]*)" enters the chat room$/
*/
public function entersTheChatRoom($user)
{
if(is_null($this->defaultDriver)) {
$this->defaultDriver = $this->getSession()->getDriver();
}
@swestcott
swestcott / behat.yml.dist
Created July 2, 2012 21:50
Behat + WebDriver + SauceLabs
saucelabs:
context:
extensions:
Behat\MinkExtension\Extension:
selenium2:
browser: iexplore
wd_host: username:password@ondemand.saucelabs.com/wd/hub
capabilities: { "platform": "VISTA", "browser": "iexplore", "version": "9"}