Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/awk -f
# usage: unexpand.awk [-v ts=4] [inputfile ...] < input
BEGIN {
if (!ts) {
ts = 8
}
split(" , , , , , , , ", spc_tbl, ",")
> import Text.Parsec.String (Parser)
> import Text.Parsec.Prim ((<|>), runParser)
> import qualified Text.Parsec.Combinator as C (chainl1)
> import qualified Text.Parsec.Char as PC
> import qualified Text.Parsec.Language as PL
> import qualified Text.Parsec.Token as PT
"use strict"
// output to pipe
// $ node --expose_gc --always_compact sample.js | cat > /dev/null
//
// output to fs
// $ node --expose_gc --always_compact sample.js > /dev/null
function sample() {
var i0, i1, i2, i3, i4, i5, i6, i7
var bag = (function () {
var val
return {
get: function () { return val }
, set: function (v) { val = v }
}
})()
bag.set("foo")
console.log(bag.get())
> module MergeSort (mergesort) where
> import Prelude ((.), (<=), (>), Maybe(Nothing, Just), Ord, otherwise, uncurry, undefined)
> import Data.List.Stream
> split_to_monotones :: Ord a => [a] -> [[a]]
> split_to_monotones = foldr f [] . foldr g [Nothing]
> where
> f Nothing = ([] :)
> f (Just x) = f'
'use strict'
var def_num = function (n) {
return function () {
if (arguments.length === 0) {
return n
} else if (arguments.length === 1) {
return arguments[0](n)
}
}
'use strict'
var def_num = function (n) {
return function (cont) {
return function() {
return cont(n)
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:svg="http://www.w3.org/2000/svg">
<xsl:output method="xml"/>
<xsl:template match="/svg:svg">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/local/bin/ruby20
# coding:utf-8
# vi:set ts=3 sw=3:
# vim:set sts=0 noet:
require "find"
require "pathname"
ptn = Regexp.compile ARGV[0]