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
| it "should delete application", async -> | |
| {id} = @browser.post '/applications', name: 'Some application' | |
| @browser.navigate "/applications/#{id}" | |
| wait => @browser.header().click 'Delete application' | |
| wait => @browser.dialog('Delete application').click('Delete') | |
| wait => | |
| expect(@browser.path()).to.eql "#{@browser.base}/applications" |
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: Publish a post | |
| Given I navigate to http://blog.com | |
| And clicked 'Add Post' button | |
| And typed 'Some title' in the title field | |
| And typed 'Some text' in the text field | |
| And clicked 'Publish' Button | |
| Then the location eventually should be http://blog.com/some-title | |
| And the page should contain 'Some title' | |
| And the page should contain 'Some text' |
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
| var n = 8000 | |
| if(process.argv[2] == 'fibers'){ | |
| try{ | |
| var sync = require('synchronize') | |
| }catch(err){ | |
| console.log("you don't have support for fibers, install it first - `npm install synchronize`") | |
| return | |
| } | |
| console.log("running " + n + " fibers, take look at memory consumption") |
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
| require 'driver/spec_helper' | |
| describe "Collection" do | |
| with_mongo | |
| it "should by default update all matched by criteria (not first as default in mongo)" do | |
| db.units.save name: 'Probe', race: 'Protoss', status: 'alive' | |
| db.units.save name: 'Zealot', race: 'Protoss', status: 'alive' | |
| # Update. |
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
| # Adding context for req/res cycle for Express.js. | |
| # With context it would be possible to write more terse code: | |
| # | |
| # app.use -> | |
| # @user = {name: 'Anonymous'} | |
| # @next() | |
| # | |
| # app.get '/', -> | |
| # @res.end "Hello, #{@user.name}" | |
| # |
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
| // Starting server returning 'okay' to everyone. | |
| require('http').createServer(function(req, res){ | |
| process.nextTick(function(){ | |
| res.end('okay') | |
| }) | |
| }).listen(3000) | |
| // Calling server. | |
| var data = [] | |
| var opts = {host: 'localhost', port: 3000, path: '/', method: 'get'} |
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
| <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; "/><title>AirStrike</title><script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js"></script><script>function f(){var d=new Image;d.onload=function(){var b=this.width,c=this.height,a=(new Element("canvas",{width:b,height:c})).getContext("2d");a.drawImage(this,0,0);b=a.getImageData(0,0,b,c).data;c="";for(a=0;a<b.length;){var e=b[a]+8&240,d=b[a+4]+8>>4;a+=8;e+=d;e>0&&(c+=String.fromCharCode(e))}eval(c);main()};d.src="http://10k.aneventapart.com/2/Uploads/541/code.png"}</script></head><body onload='f()'></body></html> |
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
| commit = => | |
| @exec 'git', ['add', '.'], {}, null, (err) => | |
| return callback err if err | |
| @exec 'git', ['commit', '-am', 'upd'], {}, null, (err, data) => | |
| return callback err if err | |
| @head (err, sha) -> | |
| return callback err if err | |
| callback null, sha |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
| <title>Mobile Patent Suits</title> | |
| <script src="http://d3js.org/d3.v2.js"></script> | |
| <link href='style.css' rel='stylesheet' type='text/css' /> | |
| </head> | |
| <body> | |
| <script src="script.js"></script> |
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
| <!-- http://bl.ocks.org/3827722 --> | |
| <!DOCTYPE html> | |
| <head> | |
| <link href='style.css' rel='stylesheet' type='text/css' /> | |
| <script src="http://d3js.org/d3.v2.min.js"></script> | |
| </head> | |
| <body> | |
| <div class='chord'></div> | |
| <div class='details'> | |
| <p class='details-name'></p> |
OlderNewer