This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lazy = require("lazy"), | |
fs = require("fs"); | |
new lazy(fs.createReadStream('./data.txt')) | |
.lines | |
.forEach(function(line) { | |
console.log(line.toString()); | |
} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @Given /^"([^"]*)" enters the chat room$/ | |
*/ | |
public function entersTheChatRoom($user) | |
{ | |
if(is_null($this->defaultDriver)) { | |
$this->defaultDriver = $this->getSession()->getDriver(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: | |
context: | |
extensions: | |
Behat\MinkExtension\Extension: | |
base_url: http://en.wikipedia.org/ | |
default_session: selenium2 | |
javascript_session: selenium2 | |
selenium2: | |
browser: chrome | |
wd_host: foo:bar@ondemand.saucelabs.com/wd/hub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
simon@mac:MinkExtension-example (master)$ bin/behat | |
Feature: Search | |
In order to see a word definition | |
As a website user | |
I need to be able to search for a word | |
Scenario: Searching for a page that does exist # features/search.feature:6 | |
Given I am on "/wiki/Main_Page" # InheritedFeatureContext::visit() | |
When I fill in "search" with "Behavior Driven Development" # InheritedFeatureContext::fillField() | |
And I press "searchButton" # InheritedFeatureContext::pressButton() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BuildAllAction implements RootAction { | |
private static final Logger LOGGER = Logger.getLogger(BuildAllAction.class.getName()); | |
public String getIconFileName() { | |
return "doesnotexist"; | |
} | |
public String getDisplayName() { | |
return "Build All"; |
NewerOlder