Skip to content

Instantly share code, notes, and snippets.

View osiro's full-sized avatar

Vinny Osiro osiro

View GitHub Profile
@osiro
osiro / keybase.md
Last active February 4, 2019 12:45

Keybase proof

I hereby claim:

  • I am osiro on github.
  • I am vinnyosiro (https://keybase.io/vinnyosiro) on keybase.
  • I have a public key ASB-4pzMykyH_ae9LW4ze1cwuseAW4T1Ovr_7hdzo4cnRgo

To claim this, I am signing this object:

@osiro
osiro / keybase.md
Created January 2, 2019 14:18
keybase.md

Keybase proof

I hereby claim:

  • I am osiro on github.
  • I am osiro (https://keybase.io/osiro) on keybase.
  • I have a public key ASAxm79Wqj97ULS3IJ9fu6v_0beZr_CQGIRwYUkebFRT_wo

To claim this, I am signing this object:

# /lib/custom_middleware/build_number.rb
module CustomMiddleware
class BuildNumber
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
headers['X-Build-Number'] = Rails.configuration.build_number
class TrackingsController < ApplicationController
def create
@tracking = Tracking.create(tracking_params)
render json: { success: true }
end
private
def tracking_params
params.require(:tracking).permit(:ip, :url)
@osiro
osiro / aaa.rb
Created November 19, 2013 08:27
1.8.7 :002 > u = User.last
=> #<User id: 8, email: "franchisee@example.com", encrypted_password: "$2a$10$7OJ1p9E/WgbTjY0XW9jULOBpuxAPIM8EnQ/Wk5.rG.0R...", reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, created_at: "2013-11-19 07:22:56", updated_at: "2013-11-19 07:22:56", uuid: nil, api_token: nil, account_id: nil, role: 0>
1.8.7 :003 > u.send_reset_password_instructions
ActionView::Template::Error: ActionView::Template::Error
from /usr/local/rvm/gems/ree-1.8.7-2011.02@gimme/gems/activesupport-3.0.19/lib/active_support/core_ext/hash/reverse_merge.rb:18:in `reverse_merge'
from /usr/local/rvm/gems/ree-1.8.7-2011.02@gimme/gems/actionpack-3.0.19/lib/action_dispatch/routing/url_for.rb:131:in `url_for'
from /usr/local/rvm/gems/ree-1.8.7-2011.02@gimme/gems/actionpack-3.0.19/lib/action_view/helpers/url_helper.rb:99:in `url_for'
from /usr/local/rvm/gems/ree-1.8.7-2011.0
require 'spec_helper'
feature 'Existing users can sign in to the site' do
let(:user) { FactoryGirl.create :user }
background do
visit root_path
click_link 'Sign in'
end
class Registered::Staff::Profile::SkillsController < Registered::Staff::ProfileController
def new
@available_positions = Position.order_by_name
@form = StaffProfileSkillsForm.from_user(current_user)
end
def create
@available_positions = Position.order_by_name
stupid_voices = [
'Agnes',
'Albert',
'Alex',
'Bad News',
'Bahh',
'Bells',
'Boing',
'Bruce',
'Bubbles',
stupid_song = [
"I threw a wish in the well",
"Don't ask me, I'll never tell",
"I looked to you as it fell",
"And now you're in my way",
"I trade my soul for a wish",
"Pennies and dimes for a kiss",
"I wasn't looking for this",
"But now you're in my way",
@osiro
osiro / aaaaaaa
Created September 20, 2013 06:37
Viniciuss-MacBook-Pro:ndri-poster_maker_mobile osiro$ rake build:ios ENV=staging
WARNING: Nokogiri was built against LibXML version 2.9.0, but has dynamically loaded 2.9.1
/Users/osiro/Workspace/ndri-poster_maker_mobile/build/ios/www/index.html
Warning. Error encountered while saving cache ./.sass-cache/91d2099510d82e7905b3da810461ac68e3a3d819/mixins.css.sassc: can't dump anonymous class #<Class:0x007ffbc678dc68>
Warning. Error encountered while saving cache ./.sass-cache/91d2099510d82e7905b3da810461ac68e3a3d819/mixins.css.sassc: can't dump anonymous class #<Class:0x007ffbc678dc68>
/Users/osiro/Workspace/ndri-poster_maker_mobile/build/ios/www/poster_pdf.html
2013-09-20 14:36:25.534 xcodebuild[63453:4107] warning: ignoring unknown attribute assignment opcode 'b' for entry <C:'CodeSign /Users/osiro/Library/Developer/Xcode/DerivedData/PosterMaker-cjmedqapejjdvyalyjqudihktxmf/Build/Products/Debug-iphoneos/PosterMaker.app'>
2013-09-20 14:36:25.535 xcodebuild[63453:4107] warning: ignoring unknown attribute assignme