Step-by-step tutorial for deployment to Digital Ocean(Ubuntu 14.04)
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
/* | |
* grunt-cli | |
* http://gruntjs.com/ | |
* | |
* Copyright (c) 2012 Tyler Kellen, contributors | |
* Licensed under the MIT license. | |
* https://github.com/gruntjs/grunt-init/blob/master/LICENSE-MIT | |
*/ | |
'use strict'; |
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
var $images = $("img[data-1x]"); | |
if (window.devicePixelRatio == 2) { | |
$.each($images, function() { | |
var $this = $(this); | |
$this.attr("src", $this.data("2x")); | |
}); | |
} else { | |
$.each($images, function() { |
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
# | |
# This is a default deploy.rb | |
# it is included into the Rails 3 Basic Template by default. | |
# | |
require 'active_support' | |
require 'lib/deploy_helpers' | |
DEPLOY_CONFIG = YAML::load(File.open("#{Rails.root}/config/deploy.yml")) |
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 | |
sudo apt-get install ruby-full | |
wget http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz -O /tmp/gems | |
tar -xzvf /tmp/gems -C /tmp | |
cd /tmp/rubygems-1.6.2 | |
sudo ruby ./setup.rb | |
sudo dpkg-divert --rename --add /usr/bin/gem | |
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem | |
sudo gem update --system |
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() { | |
var url = '/rss'; | |
var $list = $('#recent-posts'); | |
$.ajax({ | |
url: url, | |
type: 'GET', | |
dataType: 'xml', | |
success: function(data) { | |
var $items = $(data).find('item'); | |
$items.each( function() { |
rmagick
:sudo apt-get install imagemagick libmagick9-dev
mysql
,mysql2
:sudo apt-get install libmysqlclient-dev
coffee-script
:sudo apt-get install nodejs && sudo ln -s /usr/bin/nodejs /usr/local/bin/node
thinking-sphinx
:sudo apt-get install sphinxsearch
nokogiri
:sudo apt-get install libxslt-dev libxml2-dev
curb
:sudo apt-get install libcurl4-openssl-dev
sqlite3
:sudo apt-get install libsqlite3-ruby libsqlite3-dev
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
# Helper function for tweeting via twurl | |
# You must have the twurl Ruby gem installed and configured https://github.com/marcel/twurl | |
# This function goes in your bash profile | |
# Usage: tweet "This is a command line tweet" | |
function tweet { | |
twurl -q -d "status=$1" /1/statuses/update.xml | |
} |
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 ($) { | |
// Author: Mohamad El-Husseini, www.mohamad.im | |
// Light weight character counter for jQuery. | |
// Example: http://jsfiddle.net/yHPg7/6/ | |
"use strict"; | |
$.fn.counter = function (options) { | |
options = $.extend($.fn.counter.defaults, options); |
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
Vagrant::Config.run do |config| | |
config.vm.box = "lucid32" | |
config.vm.box_url = "http://files.vagrantup.com/lucid32.box" | |
config.vm.provision :chef_solo do |chef| | |
chef.cookbooks_path = "cookbooks" | |
# pass json_attribs to chef | |
chef.json = { |
OlderNewer