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
module.exports = { | |
render () = | |
div ( | |
h1 { id = 'main_heading' } (props.heading) | |
p (props.introduction) | |
) | |
} |
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
get-childitem . -include *.csproj -rec | select-string -pattern "<HintPath>[^<]+</HintPath>" | % { $_ -replace '</?HintPath>',"" } | % { write-host $_; $_ } | % { $_ -replace '[^\\]*.csproj:\d+:',"" } | % { $_ -replace '\s+','' } | % { resolve-path $_ } |
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
git checkout master | |
git pull origin master | |
[run tests] | |
[write failing test] | |
[make test pass] | |
git checkout -b feature_x | |
git add . | |
git commit -m "Feature X" | |
[refactor] | |
[run tests] |
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
<html> | |
<body> | |
<h1 id="heading"></h1> | |
<iframe id="frame" src="about:blank" style="width: 100%; height: 100%"></iframe> | |
<script type="text/javascript"> | |
var urls = [ | |
'http://httpbin.org/status/418', |
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
<script> | |
window.addEventListener("message", receiveMessage, false); | |
function receiveMessage(event) | |
{ | |
alert("RECEIVED!"); | |
if (event.origin !== "http://localhost:3000") | |
return; |
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 code = '[w <- ["happy", "days"], w].join " "' | |
var js = require('pogo').compile(code, { inScope: false }) | |
document.body.innerHTML += eval(js); |
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
mkdir beefy-test | |
cd beefy-test | |
npm init | |
npm install pogo watchify pogoify cssify beefy -save | |
echo "* { color: red }" > index.css | |
echo "require './index.css'" > index.pogo | |
echo "document.body.innerHTML = 'Featurist FTW'" >> index.pogo | |
beefy index.pogo -- -t pogoify -t cssify |
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 cssToXPath = require('css-to-xpath'); | |
document.body.innerHTML = cssToXPath('p:not(:has(a.x))'); |
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 code = ['item = 0', 'do', ' print (item)', ' item := item + 1', 'while @{ item < 10 }'] | |
try { | |
var js = require('pogo').compile(code.join("\n"), { inScope: false }) | |
document.body.innerHTML += js; | |
} catch (e) { | |
document.body.innerHTML += e.toString(); | |
} |
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 plastiq = require('plastiq'); | |
var h = plastiq.html; | |
var bind = plastiq.bind; | |
function render(model) { | |
return h('div', | |
h('input', | |
{ | |
type: 'file', | |
model: function (file) { |