Demo showing how each tab has its own history stack. Navigating between each tab remembers the correct back and forward views that were visited.
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
object cps { | |
/** | |
* | |
* The code below translates this blog post | |
* http://blog.infinitenegativeutility.com/2016/8/resources--laziness--and-continuation-passing-style) | |
* into scala, and uses laziness where appropriate to highlight the issue. | |
* | |
* I also include a type for IO. This is mainly illustrative, but also ensures | |
* we "sequence" actions appropriately. Haskell's IO monad works in tandem with the |
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
ppjson () { | |
ruby -e "require 'json'; puts JSON.pretty_generate(JSON.parse(STDIN.read))" | |
} |
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 branch -r --merged | | |
grep origin | | |
grep -v '>' | | |
grep -v master | | |
xargs -L1 | | |
awk '{split($0,a,"/"); print a[2]}' | | |
xargs git push origin --delete |
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
# ... require zombie, vows, etc. ... | |
events = require("events") | |
zombie.synchronousChain = (browser, steps)-> | |
promise = new(events.EventEmitter) | |
zombie._linkInTheChain(promise, browser, steps) | |
promise | |
zombie._linkInTheChain = (promise, browser, steps)-> |
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
# Ways to execute a shell script in Ruby | |
# Example Script - Joseph Pecoraro | |
cmd = "echo 'hi'" # Sample string that can be used | |
# 1. Kernel#` - commonly called backticks - `cmd` | |
# This is like many other languages, including bash, PHP, and Perl | |
# Synchronous (blocking) | |
# Returns the output of the shell command | |
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |