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
# This copies a file from HTTP to S3 | |
require 'net/http' | |
require 'aws/s3' | |
http_url = 'http://www.google.com/intl/en_com/images/srpr/logo1w.png' | |
http_domain = http_url.gsub('http://','').split('/')[0] | |
http_path = '/' + http_url.gsub('http://','').split('/')[1..999].join('/') | |
file_name = File.basename(http_url) | |
s3_path = "path/to/new/#{file_name}" |
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
class IamConnect.Collections.Locations extends Backbone.Collection | |
url: '/api/locations' | |
model: IamConnect.Models.Location | |
_.extend IamConnect.Collections.Locations.prototype, IamConnect.Mixins.PaginationCollectionMethods.prototype |
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 File.expand_path('../boot', __FILE__) | |
require 'rails/all' | |
# If you have a Gemfile, require the gems listed there, including any gems | |
# you've limited to :test, :development, or :production. | |
Bundler.require(:default, Rails.env) if defined?(Bundler) | |
module Slideshowbob | |
class Application < Rails::Application |
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
$ brew --config | |
HOMEBREW_VERSION: 0.9 | |
HEAD: d9476a9d1564af87a2fc83a61c434d327a87b8bc | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
CPU: quad-core 64-bit sandybridge | |
OS X: 10.7.4 | |
Kernel Architecture: x86_64 | |
Xcode: 4.3.2 | |
GCC-4.0: N/A |
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
$.fn.inGroupsOf = function( countPerGroup, groupName ) { | |
var groups = [], offset = 0, $group, jsonOptions; | |
while ( ($group = this.slice( offset, (countPerGroup + offset) )).length ) { | |
jsonOptions = {}; | |
jsonOptions[groupName] = $group.toArray(); | |
groups.push( jsonOptions ); | |
offset += countPerGroup; | |
} | |
return groups; | |
}; |
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
# Add these two gems | |
gem 'ice_cube', '0.9.3' | |
gem 'squeel', '1.0.16' |
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
$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install sphinx | |
==> Downloading http://sphinxsearch.com/files/sphinx-2.0.6-release.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/sphinx-2.0.6.tar.gz | |
/usr/bin/tar xf /Library/Caches/Homebrew/sphinx-2.0.6.tar.gz | |
==> Downloading http://snowball.tartarus.org/dist/libstemmer_c.tgz | |
Already downloaded: /Library/Caches/Homebrew/libstemmer_c.tgz | |
/usr/bin/tar xf /Library/Caches/Homebrew/libstemmer_c.tgz | |
==> ./configure --prefix=/usr/local/Cellar/sphinx/2.0.6 --disable-dependency-tracking --localstatedir=/usr/local/var --with-libstemmer --without-mysql | |
./configure --prefix=/usr/local/Cellar/sphinx/2.0.6 --disable-dependency-tracking --localstatedir=/usr/local/var --with-libstemmer --without-mysql |
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
$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install sphinx | |
Warning: Using Clang, but this formula is reported to fail with Clang. | |
sphinxexpr.cpp:1802:11: error: use of undeclared identifier 'ExprEval' | |
We are continuing anyway so if the build succeeds, please open a ticket with | |
the subject | |
sphinx-2.0.6: builds with Clang-425-10.7 |
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
$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install sphinx --pgsql | |
Warning: Using Clang, but this formula is reported to fail with Clang. | |
sphinxexpr.cpp:1802:11: error: use of undeclared identifier 'ExprEval' | |
We are continuing anyway so if the build succeeds, please open a ticket with | |
the subject | |
sphinx-2.0.6: builds with Clang-425-10.7 |
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/initializers/mime_types.rb | |
Mime::Type.register "application/vnd.ms-excel", :xls |
OlderNewer