Starring Chevy Chase, Jim Carrey, Fred Armisen, Darrell Hammond, Dan Aykroyd, Maya Rudolph, and Dana Carvey, and somehow they got Ron Howard to direct it.
One’s aesthetic reaction to the following code snippets [regarding parentheses] distinguishes the Rubyist from the…
This is freakin’ awesome. A 3D Coke can that uses CSS to create a displacement map.
Posted via web from Flash is Dead | Comment »
One’s aesthetic reaction to the following code snippets [regarding parentheses] distinguishes the Rubyist from the Pythonista:
attr_accessor(:title, :slug, :body) belongs_to(:article) before_save(:encrypt_password) get("/articles") do haml(:article) end
Posted via web from Jarinheit | Comment »
The built-in formula for installing MongoDB with Homebrew is only up to
version 1.2.0, so I put together this recipe to install 1.3.0. MongoDB
is actually up to 1.3.2, but MongoHQ
only uses 1.3.0 for now
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
require ‘formula’
require ‘hardware’
class Mongodb <Formula
homepage ‘http://www.mongodb.org/’
aka :mongo
if Hardware.is_64_bit? and not ARGV.include? ‘—32bit’
url ‘http://downloads.mongodb.org/osx/mongodb-osx-x86_64-1.3.0.tgz’
md5 ‘db021bcc5dfd1c9b8694bead78e68bc5’
version ‘1.3.0-x86_64’
else
url ‘http://downloads.mongodb.org/osx/mongodb-osx-i386-1.3.0.tgz’
md5 ‘29aaca0299e3633c375973d63d4a5a88’
version ‘1.3.0-i386’
end
def skip_clean? path
true
end
def install
# Copy the prebuilt binaries to prefix
system “cp -prv * #{prefix}”
# Create the data and log directories under /var
(var+‘mongodb’).mkpath
(var+‘log/mongodb’).mkpath
# Write the configuration files and launchd script
(prefix+‘mongod.conf’).write mongodb_conf
(prefix+‘org.mongodb.mongod.plist’).write startup_plist
end
def caveats; «-EOS
You can enable mongodb to automatically load on login with:
launchctl load -w #{prefix}/org.mongodb.mongod.plist
Or start it manually:
mongod run —config #{prefix}/mongod.conf
EOS
end
def mongodb_conf
return «-EOS
# Store data in #{var}/mongodb instead of the default /data/db
dbpath = #{var}/mongodb
# Only accept local connections
bind_ip = 127.0.0.1
EOS
end
def startup_plist
return «-EOS
<?xml version=”1.0” encoding=”UTF-8”?>
<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0”>
<dict>
<key>Label</key>
<string>org.mongodb.mongod</string>
<key>ProgramArguments</key>
<array>
<string>#{bin}/mongod</string>
<string>run</string>
<string>—config</string>
<string>#{prefix}/mongod.conf</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>UserName</key>
<string>#{`whoami`.chomp}</string>
<key>WorkingDirectory</key>
<string>#{HOMEBREW_PREFIX}</string>
<key>StandardErrorPath</key>
<string>#{var}/log/mongodb/output.log</string>
<key>StandardOutPath</key>
<string>#{var}/log/mongodb/output.log</string>
</dict>
</plist>
EOS
end
end
|
Posted via email from Jarinheit | Comment »
March 1 (Bloomberg) — The earthquake that killed more than 700 people in Chile on Feb. 27 probably shifted the Earth’s axis and shortened the day, a National Aeronautics and Space Administration scientist said.
Earthquakes can involve shifting hundreds of kilometers of rock by several meters, changing the distribution of mass on the planet. This affects the Earth’s rotation, said Richard Gross, a geophysicist at NASA’s Jet Propulsion Laboratory in Pasadena, California, who uses a computer model to calculate the effects.
“The length of the day should have gotten shorter by 1.26 microseconds (millionths of a second),” Gross, said today in an e-mailed reply to questions. “The axis about which the Earth’s mass is balanced should have moved by 2.7 milliarcseconds (about 8 centimeters or 3 inches).”
