Skip to content

Instantly share code, notes, and snippets.

View mcandre's full-sized avatar

Andrew mcandre

  • Milwaukee, WI
View GitHub Profile
@mcandre
mcandre / brewing-ffcall
Created February 28, 2011 20:55
Error: Failure while executing: make install
$ brew install -v ffcall
==> Build Environment
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
MAKEFLAGS: -j2
==> Downloading http://www.haible.de/bruno/gnu/ffcall-1.10.tar.gz
File already downloaded and cached to /Users/andrew/Library/Caches/Homebrew
$ cat scriptedmain.hs
#!/usr/bin/env runhaskell
module ScriptedMain where
meaningOfLife :: Int
meaningOfLife = 42
main :: IO ()
main = putStrLn $ "Main: The meaning of life is " ++ show meaningOfLife
$ clj -e "(+ 2 2)"
Exception in thread "main" clojure.lang.LispReader$ReaderException: java.lang.Exception: EOF while reading, starting at line 1
at clojure.lang.LispReader.read(LispReader.java:180)
at clojure.core$read.invoke(core.clj:3269)
at clojure.core$read.invoke(core.clj:3267)
at clojure.lang.FnLoaderThunk.invoke(FnLoaderThunk.java:41)
at clojure.main$eval_opt.invoke(main.clj:294)
at clojure.lang.FnLoaderThunk.invoke(FnLoaderThunk.java:31)
at clojure.main$initialize.invoke(main.clj:315)
at clojure.lang.FnLoaderThunk.invoke(FnLoaderThunk.java:36)
#!/bin/bash
#(comment
exec clj -m `basename $0 .clj` ${1+"$@"}
exit
#)
(ns hello
(:gen-class))
(defn -main []
@mcandre
mcandre / Facebook Follow
Created April 4, 2011 19:08
example HTML code for a Facebook button
<a href="http://www.facebook.com/pages/The-Matrix/113401482006986"><img src="http://a2.sphotos.ak.fbcdn.net/photos-ak-ash1/v231/62/11/10381469571/n10381469571_770783_5105.jpg" width="144" height="44" alt="facebook folow" /></a>
$ brew install -v gprolog
==> Build Environment
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
MAKEFLAGS: -j2
==> Downloading http://www.gprolog.org/gprolog-1.3.1.tar.gz
File already downloaded and cached to /Users/andrew/Library/Caches/Homebrew
$ brew doctor
Warning: Unbrewed dylibs were found in /usr/local/lib
You have unbrewed dylibs in /usr/local/lib. If you didn't put them there on purpose,
they could cause problems when building Homebrew formulae.
Unexpected dylibs (delete if they are no longer needed):
/usr/local/lib/libcord.1.dylib
/usr/local/lib/libgc.1.dylib
/usr/bin is in your PATH before Homebrew's bin. This means that system-
@mcandre
mcandre / hashmat.hs
Created April 22, 2011 04:03
Hashmat the brave warrior
#!/usr/bin/env runhaskell
-- Andrew Pennebaker
-- 21 April 2011
import Data.String.Utils (split)
import Data.List (intercalate)
-- Thanks to aavogt at #haskell
maybeRead :: Read a => String -> Maybe a
@mcandre
mcandre / boot.patch
Created April 27, 2011 00:47
Required for compiling GHC in Haiku
--- boot 2011-01-31 00:25:34.215744512 +0000
+++ boot.new 2011-01-31 00:25:53.589561856 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!perl -w
use strict;
@@ -43,7 +43,7 @@
}
// pewpewpew
// format: pauper
// https://gist.github.com/952776
// Lands
10 Mountain
10 Island
// Instants
4 Geistflame