This file contains hidden or 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 'oauth2' | |
# Instantiate client | |
client = OAuth2::Client.new( | |
ENV['BOOTIC_CLIENT_ID'], | |
ENV['BOOTIC_CLIENT_SECRET'], | |
site: 'https://api.bootic.net', | |
authorize_url:'https://auth.bootic.net/oauth/authorize', | |
token_url:'https://auth.bootic.net/oauth/token' | |
) |
This file contains hidden or 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
# config/environments/production.rb: | |
config.action_controller.asset_host = "http://cdn%d.example.com" | |
# config/initializers/refinery/images.rb: | |
config.dragonfly_url_format = "/images/:job/:basename.:ext" | |
if Rails.env.production? | |
config.dragonfly_url_host = "http://cdn4.example.com" | |
end | |
# config/initializers/refinery/resources.rb: |
This file contains hidden or 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
web: bundle exec rails server puma -p $PORT -e $RACK_ENV | |
critical: env HEROKU_PROCESS=critical bundle exec sidekiq -c 2 -q critical,4 | |
default: env HEROKU_PROCESS=default bundle exec sidekiq -c 4 -q default,2 | |
low: env HEROKU_PROCESS=low bundle exec sidekiq -c 1 -q low,1 |
This file contains hidden or 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
<html> | |
<head> | |
<title>Mixpanel AMD Example - Sync</title> | |
<script type="text/javascript" src="http://requirejs.org/docs/release/2.1.8/minified/require.js"></script> | |
<script type="text/javascript"> | |
requirejs.config({ | |
paths : { 'mixpanel': "//cdn.mxpnl.com/libs/mixpanel-2.2.min" }, | |
shim: { | |
'mixpanel': { | |
deps: ['mixpanel-preinit'], |
This file contains hidden or 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 | |
# Download all VMWare Fusion machines from Modern.IE Website to test your Website/Web Application in Microsoft Internet Explorer on Mac OSX. All VM's and other VM's for Windows and Linux and other Virtual Manager's such as VirtualBox can be found at http://modern.ie/ | |
# Don't have cURL or want to learn more, visit http://curl.haxx.se/.. are you really a Developer? First part of that sentence comes from the MS site. | |
read -p "--> Downloading Internet Explorer 6-10 on Windows XP/7/8 Appliances for VMWare Fusion. Large downloads ahead. (Press Enter to continue)." | |
echo "--> Download Internet Explorer 6 on Microsoft Windows XP Appliance for VMWare Fusion." | |
curl --progress-bar -O "http://virtualization.modern.ie/vhd/IEKitV1_Final/VMWare_Fusion/IE6_XP/IE6.XP.For.MacVMware.sfx" | |
echo "--> Download Internet Explorer 8 on Microsoft Windows XP Appliance for VMWare Fusion." |
This file contains hidden or 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
# Get the 1.0.1 version of SSL | |
brew install openssl | |
./configure --disable-hipe --enable-smp-support --enable-threads --enable-kernel-poll --enable-darwin-64bit --with-ssl=/usr/local/opt/openssl | |
touch lib/wx/SKIP lib/odbc/SKIP | |
make -j4 | |
sudo make install |
This file contains hidden or 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 "open-uri" | |
require 'json' | |
require 'celluloid/autostart' | |
def json(url) | |
JSON.parse(open(url, 'Authorization' => 'Bearer API TOKEN').read) | |
end | |
class Resource | |
This file contains hidden or 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 "open-uri" | |
require 'json' | |
def json(url) | |
JSON.parse(open(url, 'Authorization' => 'Bearer API_TOKEN').read) | |
end | |
class Future < BasicObject | |
def initialize(callable) | |
@thread ||= ::Thread.new { callable.call } |
This file contains hidden or 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
// Bootic Ajax cart widget | |
// This function gets passed an instance of the Bootic.Cart class | |
// https://github.com/bootic/bootic_cart | |
// Ismael Celis 2013 for Bootic.net | |
// -----------------------------------------------------*/ | |
;(function ($, cart, cartSelector, counterSelector) { | |
function loading () { | |
$('.loading', cartSelector).show() | |
} |
This file contains hidden or 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
Commit = Struct.new(:repo, :sha, :comment, :stats) do | |
def refactoring?(previous_commit) | |
return :spec_files_unchanged if no_changes_to_specs | |
return :comment if refactoring_comment | |
return false if result.nil? || result.failed > 0 || result.total == 0 | |
return :spec_results_unchanged if result == previous_commit.result | |
return false | |
end | |
def no_changes_to_specs |