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 batchImport(season, type) { | |
var script = "// Starting point \n $('.icon-btn-download').trigger('click'); \n\n"; | |
var resourceType = type.toUpperCase(); | |
var url | |
var timeout = 500; | |
console.log($(".resource-item[data-format=" + resourceType + "][data-season=" + season + "]").length); | |
$(".resource-item[data-format=" + resourceType + "][data-season=" + season + "]").each(function(index, element){ | |
var $resourceItem = $(element); |
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 ApplicationHelper | |
... | |
def present(object, klass = nil) | |
klass ||= "#{object.class}Presenter".constantize | |
presenter = klass.new(object, self) | |
yield presenter if block_given? | |
presenter | |
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
GIT | |
remote: git://gitcafe.com/larryzhao/rails_emoji.git | |
revision: d1831cddf39dff21384693cdf9e892fbc7603fe2 | |
branch: maleskine | |
specs: | |
rails_emoji (1.7.0) | |
rails (>= 3.1.0) | |
GIT | |
remote: git://github.com/alexandru/stuff-classifier.git |
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
// MySQLTest.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" | |
#include <iostream> | |
#include "mysql_connection.h" | |
#include "mysql_driver.h" | |
#include "cppconn\statement.h" | |
#include "cppconn\resultset.h" |
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
def thefunc | |
@this = "123" | |
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
require 'torquebox-capistrano-support' | |
require 'bundler/capistrano' | |
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path. | |
require "rvm/capistrano" # Load RVM's capistrano plugin. | |
set :rvm_ruby_string, 'jruby-1.6.7@myapp' | |
set :use_sudo, false | |
set :stages, %w(staging production) | |
set :default_stage, "production" | |
require 'capistrano/ext/multistage' | |
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
$ cap deploy:start | |
triggering load callbacks | |
* executing `staging' | |
triggering start callbacks for `deploy:start' | |
* executing `multistage:ensure' | |
* executing `deploy:start' | |
Starting TorqueBox AS | |
* executing "nohup /usr/local/rvm/gems/jruby-1.6.7@global/gems/torquebox-server-2.0.0.cr1-java/jboss/bin/standalone.sh -b 0.0.0.0 < /dev/null > /dev/null 2>&1 &" | |
servers: ["domain"] | |
[domain] executing command |
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
$ jruby json_text.rb | |
["に到着を待っている"] is in encoding: UTF-8 | |
に到着を待っている is in encoding ASCII-8BIT |
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
Twitter::Extractor | |
mentions | |
should accept a block arugment and call it in order | |
single screen name alone | |
should be linked | |
should be linked with _ | |
should be linked if numeric | |
multiple screen names | |
should both be linked | |
screen names embedded in text |
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
load 'deploy' | |
# Uncomment if you are using Rails' asset pipeline | |
# load 'deploy/assets' | |
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | |
load 'config/deploy' # remove this line to skip loading any of the default tasks |
OlderNewer