Author: Ari Lerner.
AngularJS offers a single framework that can be used to build dynamic, client-centric applications. It provides:
- Module support
- DOM manipulation
- Animations
- Templating
Author: Ari Lerner.
AngularJS offers a single framework that can be used to build dynamic, client-centric applications. It provides:
##Refs
namespace :deploy do | |
desc "Hot-reload God configuration for the Resque worker" | |
task :reload_god_config do | |
sudo "god stop resque" | |
sudo "god load #{File.join(deploy_to, 'current', 'config', 'resque-' + rails_env + '.god')}" | |
sudo "god start resque" | |
end | |
end | |
# append to the bottom: |
require 'spec_helper' | |
feature "Editing tickets" do | |
let!(:project) { Factory(:project) } | |
let!(:ticket) { Factory(:ticket, :project => project) } | |
before do | |
visit '/' | |
click_link project.name | |
click_link ticket.title |
Animals.each do |letter, results| | |
10.times do | |
doc = Nokogiri::HTML(open("http://www.ocar.org/page.php?tut=realtor-affiliate-search-results&tid=802&pid=8&first_or_last_name=#{letter}&city=&office=&btc=&op=find_a_realtor&ftut=find-a-realtor&start=#{results_per_page}")) | |
realtors = {} | |
('a'..'z').each do |n| | |
realtors[n] = Realtor.create | |
end | |
doc.css('div.search_results_item').each do |number| | |
phone_number = /\(\d{3}\)\s\d{3}-\d{4}/.match("#{number.content}") | |
('a'..'z').each do |n| |
class ActionDispatch::Routing::Mapper | |
def draw(routes_name) | |
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
end | |
end | |
BCX::Application.routes.draw do | |
draw :api | |
draw :account | |
draw :session |
/*! | |
* jQuery TextChange Plugin | |
* http://www.zurb.com/playground/jquery-text-change-custom-event | |
* | |
* Copyright 2010, ZURB | |
* Released under the MIT License | |
*/ | |
(function ($) { | |
$.event.special.textchange = { |
<ul class="social-links"> | |
<li class="facebook"><%= link_to "Like us on Facebook", facebook_path %></li> | |
<li class="twitter"><%= link_to "Follow us on Twitter", twitter_path %></li> | |
</ul> |
require 'mysql2' | |
client = Mysql::Client.new(:host => "localhost", :username => "root") | |
# Fetch running threads | |
processes = client.query("SHOW FULL PROCESSLIST") | |
processes.each do |process| | |
# Kill thread |
class Article | |
attr_reader :filename | |
def initialize(filename) | |
@filename = filename | |
end | |
def <=> other | |
self.filename <=> other.filename | |
end |