Skip to content

Instantly share code, notes, and snippets.

View zenlambda's full-sized avatar

Frank Wilson zenlambda

View GitHub Profile

This might be useful after running configure:

find . -type f -name GNUmakefile.* -exec sed -i -e 's|,-R\$(INSTALL_PREFIX)/\$(INSTALL_LIB)|,-rpath $(INSTALL_PREFIX)/$(INSTALL_LIB)|g' {} \;
#!/bin/bash
find . -type f -name *.sql -print0 | xargs -0 cat | wc -l
@zenlambda
zenlambda / ScalaCheckProperties.scala
Last active December 28, 2015 15:19
While working on assignment 2 for the "Reactive Programming with Scala course" I got frustrated with the ScalaCheck library. It's difficult to get it to print out the name of the failing property (in this case "scalatest doc property"). Nor can you seem to print out argument names as the scalatest documentation suggests [1]. http://www.scalatest…
package simulations
import org.scalacheck.Properties
import org.scalacheck.Prop.forAll
class ScalaCheckProperties extends Properties("Properties from ScalaTest Docs") {
// based on example "supply argument names" property from:
// http://www.scalatest.org/user_guide/generator_driven_property_checks
@zenlambda
zenlambda / funprog-scala-gitignore
Created November 4, 2013 22:14
.gitignore file used for "Functional Programming Principles in Scala" https://www.coursera.org/course/progfun. Should also work for "Reactive Programming In Scala" https://www.coursera.org/course/reactive. See comments for further explanation.
.DS_Store
*.zip
*.class
*.log
.metadata
# sbt specific
dist/*
target/
lib_managed/
@zenlambda
zenlambda / ls-tree.js
Last active December 14, 2015 19:48
This program lists files in a non-deterministic order on windows (node v0.8.22 and v0.10.0) On linux on v0.8.22 the files are listed arbitrarily but consistently between runs On linux with v0.10.0 the entries in a directory are listed alphabetically Invoke with: node ls-tree /path/to/tree/to/crawl
// this program lists files in a non-deterministic order on windows (node v0.8.22 and v0.10.0)
// on linux on v0.8.22 the files are listed arbitrarily but consistently between runs
// on linux with v0.10.0 the entries in a directory are listed alphabetically
// invoke with:
// node ls-tree /path/to/tree/to/crawl
var events = require('events');
var path = require('path');
var Stream = require('stream');