Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
| @media only screen and (min-width: 320px) { | |
| /* Small screen, non-retina */ | |
| } | |
| @media | |
| only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px), | |
| only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px), | |
| only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px), |
| # Thanks to http://makandracards.com/makandra/1431-resque-+-god-+-capistrano for an idea and v2 version. | |
| namespace :god do | |
| def god_is_running | |
| capture(:bundle, "exec god status > /dev/null 2>&1 || echo 'god not running'") != 'god not running' | |
| end | |
| # Must be executed within SSHKit context | |
| def config_file | |
| "#{release_path}/config/god.rb" |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
| # Install Git needed for Git based gems | |
| packages: | |
| yum: | |
| git: [] | |
| class API::V1::BaseController < ApplicationController | |
| skip_before_filter :verify_authenticity_token | |
| before_filter :cors_preflight_check | |
| after_filter :cors_set_access_control_headers | |
| def cors_set_access_control_headers | |
| headers['Access-Control-Allow-Origin'] = '*' | |
| headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS' |
| VCR.configure do |c| | |
| c.cassette_library_dir = 'spec/fixtures/vcr_cassettes' | |
| c.hook_into :webmock | |
| c.ignore_localhost = true | |
| c.default_cassette_options = { record: :new_episodes } | |
| c.allow_http_connections_when_no_cassette = false | |
| c.configure_rspec_metadata! | |
| c.ignore_hosts 'codeclimate.com' |
| /** | |
| * Fetches how many bytes have been downloaded so far and updates ProgressBar | |
| */ | |
| class DownloadProgressCounter extends Thread { | |
| private final long downloadId; | |
| private final DownloadManager.Query query; | |
| private Cursor cursor; | |
| private int lastBytesDownloadedSoFar; | |
| private int totalBytes; |
| var sendString = (function(rfb, force, sendDelay) { | |
| sendDelay = sendDelay || 25; | |
| var _q = []; | |
| var _qStart = function() { | |
| var chr = _q.shift(); | |
| if (chr) { | |
| rfb.sendKey(chr); | |
| setTimeout(_qStart, sendDelay); | |
| } | |
| }; |
curl -XDELETE localhost:9200/*