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
sealed case class Person(name: String, age: Int) | |
val p = Person("Steven", 38) | |
println(p) | |
val p2 = p.copy(age = 39) | |
println(p2) |
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
#!/usr/bin/ruby | |
seconds = [ | |
2 * 60 + 58.65, | |
3 * 60 + 19.55, | |
3 * 60 + 13.48 , | |
3 * 60 + 3.89, | |
3 * 60 + 18.69, | |
2 * 60 + 59.03, | |
2 * 60 + 58.42, |
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
$ sudo port install id3lib | |
---> Computing dependencies for id3lib | |
---> Fetching id3lib | |
---> Attempting to fetch id3lib-3.8.3.tar.gz from http://mirror.aarnet.edu.au/pub/FreeBSD/ports/distfiles/ | |
---> Verifying checksum(s) for id3lib | |
---> Extracting id3lib | |
---> Applying patches to id3lib | |
---> Configuring id3lib | |
---> Building id3lib | |
---> Staging id3lib into destroot |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'id3lib' | |
def usage() | |
STDERR.puts "Usage: id3dump <mp3-file>" | |
exit 1 | |
end |
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/bash | |
find . -type d -mindepth 1 -maxdepth 1 -print0 | xargs -0 du -ms | sort -rn | cut -f2 | while read dir; do | |
du -hs "$dir" | |
done |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'id3lib' | |
def usage() | |
STDERR.puts "Usage: id3dump <mp3-file>" | |
exit 1 | |
end |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'id3lib' | |
def usage() | |
scriptName = File.basename($0) | |
STDERR.puts "Usage: #{scriptName} <mp3-file>" | |
exit 1 | |
end |
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
$ gist Foo.scala | |
http://gist.github.com/365257 |
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
$ cat /etc/launchd.conf | |
setenv JAVA_HOME /Library/Java/Home | |
setenv SCALA_HOME /Users/steven/local/scala | |
setenv M2_HOME /Users/steven/local/maven | |
setenv MAVEN_OPTS -Xmx256m | |
$ echo launchd is the root of all user processes on the Mac... but that was the old way. Now with the new: | |
echo launchd is the root of all user processes on the Mac... but that was the old way. Now with the new: | |
$ cat ~/bin/Sync<tab> |
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
$ cat .ensime.m4 | |
( | |
:server-root "ENSIME_HOME()" | |
:server-cmd "bin/server.sh" | |
:server-host "localhost" | |
:server-env () | |
:project-package "com.guvera.consumer" | |
:source ("src") | |
:exclude-source () |
OlderNewer