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
derby = require 'derby' | |
{get, view, ready} = derby.createApp module | |
derby.use(require '../../ui') | |
FeedParser = require('feedparser') | |
parser = new FeedParser() | |
## ROUTES ## |
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 http = require('http'), | |
httpProxy = require('http-proxy'); | |
httpProxy.createServer(function (req, res, proxy) { | |
if(req.headers.host == 'sadjow.com') { | |
proxy.proxyRequest(req, res, { | |
host: 'sadjow.com', | |
port: 3000 | |
}); |
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
sudo apt-get install libdjvulibre-dev libjpeg-dev libtiff-dev libwmf-dev libmagickcore-dev libmagickwand-dev libmagick++-dev rvm | |
sudo gem install rmagick | |
ok! | |
Fetching: rmagick-2.13.1.gem (100%) Building native extensions. This could take a while ... Successfully installed rmagick-2.13.1 1 gem installed | |
require 'RMagick' #=> true |
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
= raw truncate(strip_tags(item.description), :length => 90, :omission => '... ') |
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
%a.addthis_button_facebook_like{"addthis:url" => product_url(p), "fb:like:layout" => "button_count"} | |
%a.addthis_button_tweet{'tw:text' => "#{p.name} #{app_title}: #{product_url(p)}"} |
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
<div class="pagination"> | |
<ul> | |
<li class="prev disabled"><span>previous</span></li> | |
<li class="active"><span>1</span></li> | |
<li><a rel="next" href="">2</a></li> | |
<li class="next"><a rel="next" href="">next</a></li> | |
</ul> |
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
$(document).ajaxStop(function() { | |
if (window.addthis) { | |
window.addthis = null; | |
window._adr = null; | |
window._atc = null; | |
window._atd = null; | |
window._ate = null; | |
window._atr = null; | |
window._atw = null; |
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
require "bundler/capistrano" | |
#set :rvm_ruby_string, "1.9.3" | |
set :rvm_type, :system | |
set :use_sudo, false | |
default_run_options[:pty] = true | |
set :shared_children, shared_children + %w{public/uploads} |
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
// company = {} | |
// Use putObject("owner.name", company,"Sadjow"); | |
// Returns {owener: {name: "Sadjow"}} | |
function putObject(path, object, value) { | |
var modelPath = path.split("."); | |
function fill(object, elements, depth, value) { | |
var hasNext = ((depth + 1) < elements.length); | |
if(depth < elements.length && hasNext) { |
OlderNewer