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
<script type="text/javascript" src="functions.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
// Fill this array with ids for the elements you want to hide | |
var revealables = ["partner_details"]; | |
prep(revealables); | |
// Fill this array with select boxes to watch for changes | |
var watchables = ["marital_status"]; | |
watch(watchables); |
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
for name in params[:post][:categories].split(",") | |
post.categories.find_or_create_by_name(name) | |
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
# In config/routes.rb: | |
map.namespace :admin do |admin| | |
admin.root :controller => :photographs | |
admin.resources :albums | |
admin.resources :categories | |
admin.resources :photographs | |
admin.resources :posts | |
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
/* How to modify the list of styles available to the user in the Wordpress/TinyMCE link feature */ | |
/* Find the following lines in wp-admin/includes/post.php, around lines 1426-1429 */ | |
... | |
'paste_remove_spans' => true, | |
'paste_strip_class_attributes' => 'all', | |
'wpeditimage_disable_captions' => $no_captions, | |
'plugins' => "$plugins" | |
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
@font-face { | |
font-family: 'Museo300'; | |
src: url('../fonts/Museo300-Regular.eot'); | |
src: local('Museo'), local('Museo-300'), url('../fonts/Museo300-Regular.woff') format('woff'), url('../fonts/Museo300-Regular.ttf') format('truetype'); } | |
body #wrapper header nav ul li h3 a { | |
text-decoration: none; | |
color: #fff4d5; |
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
mysqlimport --fields-optionally-enclosed-by='"' --fields-terminated-by=',' --lines-terminated-by='\r\n' --user=******* --password=******* --verbose --local database_name /path/to/file.csv |
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 | |
# run with: curl -s http://gist.github.com/265272.txt | bash | |
set -e | |
localdir=$HOME/.mongodb | |
datadir=$localdir/data | |
conf=$localdir/mongod.conf | |
agentdir=$HOME/Library/LaunchAgents | |
agent=$agentdir/org.mongodb.mongod.plist |
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
# using rvm with ruby-1.8.7-p249 | |
# latest version 2.7.7 2010-06-17 | |
sudo brew install libxml2 | |
# installing libxslt from source code | |
wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz | |
tar -xzvf libxslt-1.1.26.tar.gz | |
cd libxslt-1.1.26 | |
./configure --prefix=/usr/local/Cellar/libxslt/1.1.26 --with-libxml-prefix=/usr/local/Cellar/libxml2/2.7.7 |
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
module Devise | |
module Models | |
module Confirmable | |
handle_asynchronously :send_confirmation_instructions | |
end | |
module Recoverable | |
handle_asynchronously :send_reset_password_instructions | |
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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
PS1="\w\$(parse_git_branch) $ " |
OlderNewer