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
import qualified Data.ByteString.Char8 as BS | |
import Data.Ord | |
import Data.List | |
import Data.Function | |
import System | |
most_anagrams ws = sortBy (flip $ comparing length) $ groupBy (\a b -> fst a == fst b) $ sortBy (comparing fst) $ zip (map BS.sort ws) ws | |
main = do (arg:_) <- getArgs | |
d <- BS.readFile arg |
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
# Newbie Programmer | |
def factorial(x) | |
if x == 0 | |
return 1 | |
else | |
return x * factorial(x - 1) | |
end | |
end | |
puts factorial(6) | |
puts factorial(0) |
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
Cocoa hacker needed | |
Who are we? | |
- small team, kicking arse | |
- good relationship with apple | |
- flexible but demanding | |
- 4 days a week, up to 2 days wfh ok | |
Who are you? |
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
Cocoa hacker needed | |
We... | |
- are a small team (3 devs, 1 business guy, 1 jack-of-all-trades), kicking arse | |
- have a good relationship with Apple | |
- use git for source control, ghunit for testing, and hudson for continuous integration | |
- are flexible but demanding | |
- 4 days a week, up to 2 days wfh is ok |
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
require 'rspec' | |
class Bar | |
def baz | |
puts "baz called" | |
end | |
end | |
class Foo | |
def initialize |
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
cc -dynamiclib -undefined suppress -flat_namespace -install_name /Users/mwotton/.rvm/r | |
ubies/ruby-1.9.1-p378/lib/libruby.dylib -current_version 1.9.1 -compatibility_version | |
1.9.1 dln.o encoding.o array.o bignum.o class.o compar.o complex.o dir.o enum.o enum | |
erator.o error.o eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o math.o | |
numeric.o object.o pack.o parse.o process.o random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o signal.o sprintf. | |
o st.o strftime.o string.o struct.o time.o transcode.o util.o variable.o version.o com | |
pile.o debug.o iseq.o vm.o vm_dump.o thread.o cont.o ascii.o us_ascii.o unicode.o utf_8.o newline.o prelude.o dmyext.o -o libruby.1.9.1.dylib | |
w -L 'Init_*' libruby.1.9.1.dylibw: illegal option -- Lusage: w [hi] [user ...] | |
make: [libruby.1.9.1.dylib] Error 1 (ignored)./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./tool/generic_erb.rb -c -o encdb.h ./template/encdb.h.tmpl ./enc enc | |
encdb.h updatedmak |
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
newRepo2 name = do | |
req <- parseUrl "https://github.com/api/v2/json/repos/create" | |
encoded <- urlEncodedBody ["name", name] | |
res <- withManager $ httpsLbs $ encoded { method = POST } |
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
def guarded(task) | |
%x{#{task}}.tap { raise "bad exit" if $?.exitstatus!=0 } | |
rescue => e | |
yield e if block_given? | |
end | |
guarded("git config --global github.token") do |error| | |
abort "please add your token to ~/.gitconfig with git config --global github.token MYTOKEN" | |
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
➜ HFuse-0.2.3 ls -l /usr/local/include/fuse.h | |
-rw-r--r-- 1 root wheel 246 20 Dec 2008 /usr/local/include/fuse.h | |
➜ HFuse-0.2.3 cabal configure | |
Resolving dependencies... | |
Configuring HFuse-0.2.3... | |
cabal: Missing dependency on a foreign library: | |
* Missing header file: fuse.h | |
This problem can usually be solved by installing the system package that | |
provides this library (you may need the "-dev" version). If the library is | |
already installed but in a non-standard location then you can use the flags |
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
<VirtualHost *:80> | |
ServerName www.shimweasel.com | |
DocumentRoot /u/apps/www.shimweasel.com/public | |
<Directory /u/apps/www.shimweasel.com/public> | |
Allow from all | |
Options -MultiViews | |
</Directory> | |
</VirtualHost> |
OlderNewer