-
Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.
-
Reset PS3 controller by inserting paperclip into pinhole near L2 button.
-
Connect PS3 controller to Mac with USB cable.
-
Enable Bluetooth.
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
# Setting up a local solr instance on a mac | |
# install solr with homebrew | |
brew install solr | |
# create the base solr index directory | |
mkdir -p /data/solr | |
# make sure you can write to the solr logs | |
sudo chown -R `whoami` /usr/local/Cellar/solr/ |
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
source 'https://rubygems.org' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.0.0' | |
# Use mysql as the database for Active Record | |
gem "mysql2" | |
# Adds foreign key support to rails Active Record | |
# https://github.com/matthuhiggins/foreigner |
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
CarrierWave::ProcessingError (Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: Command ("mogrify -crop '217x217+0+136' /var/folders/1_/fj3rk_750w32l91pxp59xz180000gn/T/mini_magick20130913-12950-ul75bn.jpg") failed: {:status_code=>1, :output=>"mogrify: invalid argument for option `'217x217+0+136'': -crop @ error/mogrify.c/MogrifyImageCommand/4227.\n"}): |
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 'uri' | |
require 'net/http' | |
class Chunked | |
def initialize(data, chunk_size) | |
@size = chunk_size | |
if data.respond_to? :read | |
@file = data | |
end | |
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
def inspect data , depth = 0 | |
data.each do | key , value | | |
if value.class == Hash | |
spacing = '' | |
depth.times { spacing << '-' } | |
puts spacing+' '+key.to_s | |
inspect value , depth+1 | |
else | |
spacing = '' |
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($){ | |
$.alphaRange = function(from , to , onlyLetters) { | |
var startLetter = from || 'A', | |
endLetter = to || 'Z', | |
start = startLetter.charCodeAt(0), | |
end = endLetter.charCodeAt(0), | |
length = end - start, | |
letter = 0, |
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($){ | |
$.fn.popdown = function( trigger_at ) { | |
var element = this; | |
var trigger = trigger_at; | |
$(document).scroll(function(e){ | |
var spos = $(document).scrollTop(); | |
if (spos >= trigger) { |
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
#!/usr/bin/env ruby | |
require 'sinatra' | |
PUBLIC_FOLDER = File.join(File.dirname(__FILE__) , 'site') | |
set :public_folder , PUBLIC_FOLDER | |
set :static , true | |
get '/' do | |
File.open(File.join(PUBLIC_FOLDER , 'index.html') , 'r').read.to_s |