This file contains hidden or 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
| javascript:$('.issue-list-item').each(function(n, dom_issue) { | |
| var id = dom_issue.id.match(/issue_(\d+)/)[1]; | |
| /* Create your own here: https://github.com/settings/applications */ | |
| var token = 'SECRET'; | |
| $.get('https://api.github.com/repos' + window.location.pathname + '/' + id + '?access_token=' + token).success(function(issue) { | |
| if(issue.milestone && issue.milestone.title) { | |
| var $issue_number = $(dom_issue).find('.list-group-item-number'); | |
| $issue_number.text('(' + issue.milestone.title + ') ' + $issue_number.text()); | |
| } | |
| }).error(function(e) { |
This file contains hidden or 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
| ------------------------------------------------------- | |
| T E S T S | |
| ------------------------------------------------------- | |
| Running CucumberTest | |
| log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager). | |
| log4j:WARN Please initialize the log4j system properly. | |
| @selenium @browse | |
| Feature: Browse Tests | |
| As a user |
This file contains hidden or 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
| { | |
| "options": { | |
| "glue": "classpath:com/company/app/stepdefs", | |
| "format": ["pretty", "json:target/cucumber.json"] | |
| }, | |
| "environments": { | |
| "firefox": {"driver": "org.openqa.selenium.firefox.FirefoxDriver"}, | |
| "chrome": {"driver": "org.openqa.selenium.chrome.ChromeDriver"} | |
| } | |
| } |
This file contains hidden or 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/sh | |
| # Compile and show [GFM](https://help.github.com/articles/github-flavored-markdown) docs in your browser. | |
| # Before this works you need to `gem install bcat` | |
| # | |
| # Usage: gfm.sh FILE.md | |
| # | |
| curl --silent --data-binary @- https://api.github.com/markdown/raw -H "Content-Type: text/plain" | bcat |
This file contains hidden or 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/bash | |
| # Usage: flac16.sh SOURCEDIR DESTDIR | |
| # DESTDIR should have no spaces since sox chokes on it. | |
| set -e | |
| SOURCEDIR=$1 | |
| DESTDIR=$(cd $(dirname "$2"); pwd)/$(basename "$2") | |
| cd "$SOURCEDIR" | |
| rm -f tmp_flac16_source.flac | |
| for file in *.flac | |
| do |
This file contains hidden or 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
| import cucumber.api.Scenario; | |
| public class MyStepdefs { | |
| private Scenario scenario; | |
| @Before | |
| public void before(Scenario scenario) { | |
| this.scenario = scenario; | |
| } |
This file contains hidden or 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
| Scenario Outline: Create comments using supported media types | |
| Given I have an existing default incident | |
| And I know the ID for the default incident as "defaultIncidentId" | |
| And my payload type is "<type>" and I am accepting "<type>" | |
| When I POST my payload to "/v1/incidents/{defaultIncidentId}/comments" | |
| Then a response of 201 (CREATED) is returned | |
| Examples: | |
| | type | | |
| | application/json | |
This file contains hidden or 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/sh | |
| cd /System/Library/Frameworks/JavaVM.framework/Versions && sudo mv Current Current.bak && sudo ln -s CurrentJDK Current | |
| java -version |
This file contains hidden or 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
| function the_x(x, cb) { | |
| console.log('x', x); | |
| cb(); | |
| } | |
| Given(/x is (.*)/, the_x); | |
| Given(/i decide x/, function(cb) { | |
| foo(97, cb); | |
| }); |
This file contains hidden or 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
| // This is fancier than Map.putAll(Map) | |
| public Map deepMerge(Map original, Map newMap) { | |
| for (Object key : newMap.keySet()) { | |
| if (newMap.get(key) instanceof Map && original.get(key) instanceof Map) { | |
| Map originalChild = (Map) original.get(key); | |
| Map newChild = (Map) newMap.get(key); | |
| original.put(key, deepMerge(originalChild, newChild)); | |
| } else { | |
| original.put(key, newMap.get(key)); | |
| } |