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
<?xml version="1.0"?> | |
<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" | |
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_8e8dc5f69a98cc4c1ff3427e5ce34606fd672f91e6" Version="2.0" IssueInstant="2014-07-17T01:01:48Z" Destination="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"> | |
<saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer> | |
<samlp:Status> | |
<samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/> | |
</samlp:Status> | |
<saml:EncryptedAssertion> | |
<xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" | |
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Type="http://www.w3.org/2001/04/xmlenc#Element"> |
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
React = require("react") | |
classnames = require("classnames") | |
ReadOnly = (CompositeComponent) -> class extends React.Component | |
render: -> | |
<CompositeComponent | |
{...@props} | |
className={classnames("read-only": @props.read)} | |
readOnly={@props.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
var submitStream = $('#search-form').asEventStream('submit'); | |
submitStream.doAction(".preventDefault") | |
.flatMapLatest(function (e) { | |
var searchString = $(e.target).children('#search').val() | |
if (searchString !== "") { | |
return Bacon.constant(searchString); | |
} else { | |
return Bacon.never(); | |
} |
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 arr = [25,26,29,59,16,1325,3]; | |
var id = (x) => _ => x; | |
var gt = (b) => a => a > b; | |
arr.filter(gt(25)); // [26, 29, 59, 132] | |
var people = [ | |
{name: "John", age: 45}, | |
{name: "Fantomas", age: 34}, |
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
{ | |
"name": "", | |
"version": "0.0.0", | |
"description": "", | |
"main": "index.js", | |
"devDependencies": { | |
"watchify": "~0.3.0" | |
}, | |
"dependencies": { | |
"browserify": "~2.35.4", |
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
(function (num) { | |
console.time("1") | |
setTimeout(function() { | |
console.timeEnd("1") | |
}, num) | |
})(1000) |
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
-- newton's method for sqrt | |
goodEnough :: Double -> Double -> Bool | |
goodEnough guess x = abs(x - guess * guess) / x < 0.00001 | |
improveGuess :: Double -> Double -> Double | |
improveGuess guess x = (guess + x / guess) / 2 | |
sqrtIter :: Double -> Double -> Double | |
sqrtIter guess x | |
| goodEnough guess x = guess |
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
/* | |
* Runs pdflatex and bibtex on filechange. | |
* This assumes you have main.tex | |
* in the folder where command is run. | |
* | |
* Usage: node change-wathcer.js somedir & | |
*/ | |
'use strict'; | |
var fs = require('fs'), | |
exec = require('child_process').exec, |
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/sh | |
if git rev-parse --verify HEAD >/dev/null 2>&1 | |
then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
fi | |
VAR=$(git grep --cached debugger) |