Skip to content

Instantly share code, notes, and snippets.

View wolverian's full-sized avatar

Ilmari Vacklin wolverian

View GitHub Profile
class Foo(val foo: Int) {
def lol = 42
}
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by fish configure 1.23.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ ./configure --prefix=/Users/wolverian/Applications/Homebrew/Cellar/fish/1.23.1 --without-xsel
## --------- ##
## Platform. ##
@wolverian
wolverian / gist:734940
Created December 9, 2010 16:39
Plack::Test, dzil and paths
use strict;
use warnings;
use Test::Most;
use Plack::Test;
use HTTP::Request::Common;
use Cwd;
my $app_path = cwd() . '/bin/dicole-eventserver.psgi';
my $app = do($app_path) or die "$!: $app_path\n";
@wolverian
wolverian / watch
Created December 22, 2010 18:10
Perl directory/file change watcher and command runner for OS X
#!/usr/bin/env perl
use 5.010;
use strict;
use warnings;
package App::watch;
use Moose;
use File::ChangeNotify;
@wolverian
wolverian / Problem.scala
Created February 18, 2011 02:08
I'm confused about the Scala parser combinator libraries
package wolv.parserlibproblem
import util.parsing.ast.AbstractSyntax
import util.parsing.combinator.syntactical.TokenParsers
import util.parsing.combinator.lexical.Lexical
import util.parsing.combinator.token.Tokens
trait SimpleTokens extends Tokens {
case class Foo extends Token
case class Bar extends Token
@wolverian
wolverian / gist:1401598
Created November 28, 2011 19:15
use highlight.js
<script src="http://yandex.st/highlightjs/6.1/highlight.min.js"></script>
<script type="text/javascript">
hljs.initHighlightingOnLoad();
</script>
<link rel="stylesheet" href="http://yandex.st/highlightjs/6.1/styles/github.min.css">
Buildfile: /Users/wolverian/src/kotlin/build.xml
clean:
[delete] Deleting directory /Users/wolverian/src/kotlin/dist
init:
[mkdir] Created dir: /Users/wolverian/src/kotlin/dist/kotlinc
[mkdir] Created dir: /Users/wolverian/src/kotlin/dist/kotlinc/lib
[mkdir] Created dir: /Users/wolverian/src/kotlin/dist/kotlinc/lib/alt
@wolverian
wolverian / gist:1949145
Created March 1, 2012 11:17
brew install -vd git-flow
~ brew install -vd git-flow
==> Cloning https://github.com/nvie/gitflow.git
git clone --depth 1 https://github.com/nvie/gitflow.git /Users/wolverian/Library/Caches/Homebrew/git-flow--git
Cloning into '/Users/wolverian/Library/Caches/Homebrew/git-flow--git'...
remote: Counting objects: 324, done.
remote: Compressing objects: 100% (244/244), done.
remote: Total 324 (delta 101), reused 247 (delta 42)
Receiving objects: 100% (324/324), 229.24 KiB | 193 KiB/s, done.
Resolving deltas: 100% (101/101), done.
==> Checking out tag 0.4.1
require "thread"
class Future
attr_reader :exception, :cancelled
def initialize(&block)
@thread = Thread.new(&block)
@thread.abort_on_exception = false
@exception = nil
@cancelled = false