Skip to content

Instantly share code, notes, and snippets.

View greggroth's full-sized avatar

Greggory Rothmeier greggroth

  • GitHub
  • Charleston, SC
View GitHub Profile
@greggroth
greggroth / gist:1608811
Created January 13, 2012 21:33
h5util configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... /usr/bin/llvm-gcc
@greggroth
greggroth / gist:1608814
Created January 13, 2012 21:34
h5util make output
make all-am
/usr/bin/llvm-gcc -DHAVE_CONFIG_H -I. -I/usr/X11/include -O3 -w -pipe -march=core2 -msse4.1 -MT h5totxt.o -MD -MP -MF .deps/h5totxt.Tpo -c -o h5totxt.o h5totxt.c
/usr/bin/llvm-gcc -DHAVE_CONFIG_H -I. -I/usr/X11/include -O3 -w -pipe -march=core2 -msse4.1 -MT arrayh5.o -MD -MP -MF .deps/arrayh5.Tpo -c -o arrayh5.o arrayh5.c
mv -f .deps/h5totxt.Tpo .deps/h5totxt.Po
/usr/bin/llvm-gcc -DHAVE_CONFIG_H -I. -I/usr/X11/include -O3 -w -pipe -march=core2 -msse4.1 -MT h5utils.o -MD -MP -MF .deps/h5utils.Tpo -c -o h5utils.o h5utils.c
mv -f .deps/h5utils.Tpo .deps/h5utils.Po
/usr/bin/llvm-gcc -DHAVE_CONFIG_H -I. -I/usr/X11/include -O3 -w -pipe -march=core2 -msse4.1 -MT h5fromtxt.o -MD -MP -MF .deps/h5fromtxt.Tpo -c -o h5fromtxt.o h5fromtxt.c
mv -f .deps/arrayh5.Tpo .deps/arrayh5.Po
mv -f .deps/h5fromtxt.Tpo .deps/h5fromtxt.Po
/usr/bin/llvm-gcc -DHAVE_CONFIG_H -I. -I/usr/X11/include -O3 -w -pipe -march=core2 -msse4.1 -MT h5tovtk.o -MD -MP -MF .deps/h5tovtk.Tpo -c -o h5tovtk.o h5tovtk.c
@greggroth
greggroth / gist:1626861
Created January 17, 2012 14:39
Homebrew Formula for h5utils
require 'formula'
class H5utils < Formula
url 'http://ab-initio.mit.edu/h5utils/h5utils-1.12.1.tar.gz'
homepage 'http://ab-initio.mit.edu/wiki/index.php/H5utils'
md5 '46a6869fee6e6bf87fbba9ab8a99930e'
depends_on 'hdf5'
def install
@greggroth
greggroth / gist:1672399
Created January 24, 2012 20:33
Build LaTeX Document with BibTeX
# Build pdflatex and bibtex
pbpp() {
if [ -z $1 ]; then
echo "No arugment given"
return
fi
if [ ! -e "${1}.tex" ]; then
echo "Tex file not found. Verify that the current directory contains a file named ${1}.tex"
return
fi
> gonzo = Dog.new('Gonzo')
=> #<Dog:0x007fba3cad38f8 @name="Gonzo", @state="sleeping">
> gonzo.state
=> "sleeping"
class Dog
attr_accessor :name, :status
def initialize(name)
@name = name
super() # Required by state_machine to initialize states
end
state_machine :state, initial: :sleeping do
> gonzo.can_walk?
=> false
> gonzo.walk
=> false
> gonzo.state
=> "sleeping"
> gonzo.wake_up
=> true
> gonzo.walk
=> true
> gonzo.state
=> "walking"
state :sleeping do
def hungry?
false
end
end
state all - [:sleeping] do
def hungry?
true
end
diff --git a/db/schema.rb b/db/schema.rb
index 609c0a0..d37e32d 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -97,18 +97,18 @@ ActiveRecord::Schema.define(:version => 20120614194043) do
t.date "due"
t.text "notes"
t.integer "customer_id"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false