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
# Search term parser from https://gist.github.com/1477730 | |
# Modified to allow periods (and other non-letter chars) in unquoted field values | |
# and field names. | |
# | |
# Helper class to help parse out more advanced saerch terms | |
# from a form query | |
# | |
# Note: all hash keys are downcased, so ID:10 == {'id' => 10} | |
# you can also access all keys with methods e.g.: terms.id = terms['id'] = 10 | |
# this doesn't work with query as thats reserved for the left-over pieces |
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
1. install thor gem | |
> gem install thor | |
2. add wordpress script to your wordpress install root and chmod it | |
> chmod a+x wordpress | |
3. update wordpress | |
> ./wordpress update | |
4. export wordpress (php must have CLI support) |
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
default_run_options[:pty] = true | |
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
set :application, 'wordpress' | |
set :deploy_to, "/var/sites/#{application}" | |
set :use_sudo, false | |
set :user, 'server-username' | |
server 'example.com', :web, :app, :db |
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> |
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
<?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
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
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
# /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
<?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( |