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
# Used in a Stylesheet model to import other Stylesheet instances. Compile like this. | |
# The gsub is used to clean out NULL byte characters. | |
# | |
# class Stylesheet < ActiveRecord::Base | |
# include SassImporters | |
# | |
# def compile | |
# compressed_styles = SassC::Engine.new(self.sass.gsub("\u0000", ''), { :importer => DatabaseImporter }).render | |
# end | |
# 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
INSERT INTO `redirects` (`match`, `redirect_to`, `account_id`, `created_at`, `updated_at`) | |
VALUES | |
('/old_page.php', '/new/page', 40, NOW(), NOW()), | |
('/old_page_two.php', '/new/page/two', 40, NOW(), NOW()), | |
('/old_page_three.php', '/new/page-two', 40, NOW(), NOW()); |
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
// Countdown.js | |
// A plugin to generate a countdown to a date. | |
// version 1.0, January 2013 | |
// by Andrew Anderson | |
;(function ( $, window, document, undefined ) { | |
var pluginName = "countdown", | |
defaults = { | |
year: "", |
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
brew install rds-command-line-tools | |
rds-create-db-parameter-group mysql-utf8-55 --db-parameter-group-family mysql5.5 --description "MySQL 5.5 configured for UTF-8" | |
rds-modify-db-parameter-group mysql-utf8-55 \ | |
--parameters="name=character_set_server, value=utf8, method=immediate" \ | |
--parameters="name=character_set_client, value=utf8, method=immediate" \ | |
--parameters="name=character_set_results,value=utf8,method=immediate" \ | |
--parameters="name=collation_server, value=utf8_general_ci, method=immediate" \ |
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
function getProfileIDs($sortBy, $omitPhotoless) { | |
if($omitPhotoless) { | |
$this->bindModel(array('hasOne' => array('MediaProfile'))); | |
$params = array( | |
'fields' => array('Profile.id'), | |
'conditions' => array( | |
'NOT' => array('MediaProfile.media_id' => null) | |
) | |
); | |
NewerOlder