Skip to content

Instantly share code, notes, and snippets.

View rafmagana's full-sized avatar

Rafael Magaña rafmagana

  • Colima, Mexico
View GitHub Profile
@rafmagana
rafmagana / error.txt
Created October 31, 2011 15:57
Running tests
..................................................FF..
Failures:
1) Api Service via Rails ENV should have a valid connection
Failure/Error: JSON.parse(@service_connection.run!(:works))["success"].should be_true
expected false to be true
# ./api_spec/services/api_services_spec.rb:14:in `block (3 levels) in <top (required)>'
2) Api Service via API should successfully proxy the response
@rafmagana
rafmagana / xcode_error.txt
Created October 31, 2011 20:22
Xcode error
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 8 20:32:45 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".Attaching to process 5127.
2011-10-31 14:18:10.861 MaaSiveLocalAPITest[5127:f803]
************************************* DEBUG *************************************
@rafmagana
rafmagana / ios_push.rb
Created November 17, 2011 18:09
Ruby script to send Apple push notifications
#! /usr/bin/env ruby
# Rafael Magana (rafmagana@gmail.com)
# chmod +x ios_push.rb (make the script executable)
# Usage: ./ios_push 'message to alert'
%w/logger socket openssl json/.each { |lib| require lib }
SSL = OpenSSL::SSL
@rafmagana
rafmagana / gist:1392283
Created November 24, 2011 21:03 — forked from dberesford/gist:968881
Sample Node.js code for connecting to Redis Service in CloudFoundry
require.paths.unshift('./node_modules')
var http = require('http');
var fs = require('fs');
var redis = require("redis");
var util = require('util');
var server = http.createServer(function (request, response) {
// Redis local settings, overridden below if we're running in CloudFoundry
var redisPort = 6379;
@rafmagana
rafmagana / output
Created March 14, 2012 00:02
Output git push heroku master
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets
Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
Unresolved dependencies detected; Installing...
@rafmagana
rafmagana / vagrant.md
Created March 29, 2012 18:11
Installing CentOS 5.6 64-bit and Puppet on Vagrant

Installing CentOS 5.6 64-bit and Puppet on Vagrant

Notes

This document is an adaptation of the instructions found here: http://vagrantup.com/docs/base_boxes.html

These instructions are specifically for 64-bit CentOS and Puppet.

Created with the following software:

@rafmagana
rafmagana / gist:2242353
Created March 29, 2012 19:16
Building a CentOS 6 Box for Vagrant
@rafmagana
rafmagana / error.txt
Created May 1, 2012 17:38
Reviews error
127.0.0.1 GET /dc/restaurants/cuba-libre-dc/reviews 500 Internal Server Error ReviewsController#index 104.6 (DB 0.0, View 0.0) {"metro_id"=>"dc", "restaurant_id"=>"cuba-libre-dc"} {}
ActiveRecord::RecordNotFound (Couldn't find ReservationSource with id=api):
app/models/reservation_source.rb:23:in `api'
app/models/reservation.rb:46:in `block in <class:Reservation>'
app/models/user.rb:294:in `can_review_restaurant?'
app/models/user.rb:286:in `can_and_has_reviewed_restaurant?'
app/helpers/review_helper.rb:4:in `review_message'
app/views/reviews/_reviews.html.haml:1:in `_app_views_reviews__reviews_html_haml___1025243544_177588620'
app/controllers/reviews_controller.rb:23:in `block (2 levels) in index'
# spec/controllers/admin/restaurant_offers_controller.spec.rb
describe "GET :edit" do
before do
@restaurant_offer.stub(:editable?).and_return true
end
def doittoit
get :edit, id: @restaurant_offer.id, restaurant_id: @resto.id
end
@rafmagana
rafmagana / install_edge.sh
Created May 29, 2012 03:27
Installing Rails Edge
# Steps to install Rails 4.0.0.beta
rvm use 1.9.3@rails400beta --create
git clone git://github.com/rails/rails.git
gem install thor
ruby ./rails/railties/bin/rails new WAZA --dev