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
# ActiveRecord refuses to enable query caching _unless_ you have the following setup | |
# 1) you _must_ use ActiveRecord::Base.configurations to store your auth details | |
# 2) you _must_ include the ActiveRecord::QueryCache middleware | |
# 3) you _must_ inherit from the _Base_ connection -- abstract models don't | |
# cache without a bit of hacking, it only query caches anything from AR::Base | |
require 'sinatra' | |
require 'active_record' | |
# query caching requires that you use AR::Base.configurations to store your |
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
#!/bin/bash | |
# * remove those stupid PING buttons | |
# * show the store links | |
# * make the store links view more in your library (not the iTunes store) | |
defaults write com.apple.iTunes invertStoreLinks -bool YES | |
defaults write com.apple.iTunes show-store-link-arrows -bool YES | |
defaults write com.apple.iTunes hide-ping-dropdown -bool YES |
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
<?php | |
/** | |
* Very simple error logger | |
* Set error level using bitwise OR | |
* | |
* Example Usage: | |
* | |
* SimpleLogger::log_level(SimpleLogger::All); | |
* SimpleLogger::log_method(function($message, $level = 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
<?php | |
// Using the simple model -- its very similar to active record, but | |
// its basic and simple :) (and not that powerful...) | |
require 'simple_model.php'; | |
// set our environment | |
define('ENVIRONMENT', 'development'); | |
// our db configurations | |
$DatabaseAuths = array( |
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
# /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/source_index.rb:68:in `installed_spec_directories': undefined method `path' for Gem:Module (NoMethodError) | |
# solution | |
sudo rm -rf /usr/local/lib/ruby/site_ruby/1.9.1/*ubygem* | |
# make install again |
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
use Warden::Manager do |config| | |
config.default_strategies :basic | |
config.failure_app = ErrorsController.action(:unauthenticated) | |
end | |
Warden::Strategies.add :basic, HttpAuthBasicStrategy do |config| | |
config.realm = "Welcome!" | |
config.callback do |env, username, password| | |
return username if username == 'rob' | |
false |
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
task :environment do | |
require './dj-sinatra' | |
end | |
namespace :jobs do | |
desc "Clear the delayed_job queue." | |
task :clear => :environment do | |
Delayed::Job.delete_all | |
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
<?php | |
$lawpress_settings = array( | |
'lawpress.web_service_section' => array( | |
'title' => 'Web Service Settings', | |
'description' => 'NOTHING', | |
'settings' => array( | |
'lawpress.default_aop' => array( | |
'name' => 'default_aop', | |
'description' => 'Default AOP ID', |
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
.clearfix:after { | |
content: "."; | |
display: block; | |
height: 0; | |
font-size: 0; | |
clear: both; | |
visibility: hidden; | |
} | |
.clearfix {display: inline-block;} | |
/* Hides from IE5/Mac \*/ |
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
Index: ext/mysqli/php_mysqli_structs.h | |
=================================================================== | |
--- ext/mysqli/php_mysqli_structs.h (revision 301474) | |
+++ ext/mysqli/php_mysqli_structs.h (working copy) | |
@@ -54,6 +54,7 @@ | |
#define WE_HAD_MBSTATE_T | |
#endif | |
+#define HAVE_ULONG 1 | |
#include <my_global.h> |