Skip to content

Instantly share code, notes, and snippets.

View vincentpaca's full-sized avatar

Vincent Paca vincentpaca

View GitHub Profile
vincentpaca / partner_form.json
Last active January 31, 2020 08:07
FE Take Home: JSON Form Builder
"components": [
"component_type": "text",
"name": "First Name",
"data": {}
"component_type": "text",
"name": "Last Name",
vincentpaca / s3_concat.rb
Last active January 21, 2016 06:07
S3 concat
require 'aws-sdk'
rspec_bucket = s3.bucket(ENV['RSPEC_BUCKET'])
cukes_bucket = s3.bucket(ENV['CUKES_BUCKET'])
rspec_objects = rspec_bucket.objects(prefix: ENV['CI_BUILD_NUMBER'])
cukes_objects = cukes_bucket.objects(prefix: ENV['CI_BUILD_NUMBER'])
test_group_threshold = ENV['TEST_GROUPS'].to_i
vincentpaca / s3_upload.rb
Last active October 6, 2015 09:28
require 'aws-sdk'
rspec_bucket = obj = s3.bucket(ENV['RSPEC_BUCKET']).object("#{ENV['CI_BUILD_NUMBER']}/#{ENV['TEST_GROUP']}")
cukes_bucket = obj = s3.bucket(ENV['CUKES_BUCKET']).object("#{ENV['CI_BUILD_NUMBER']}/#{ENV['TEST_GROUP']}")
log_files.each do |log_file|
bucket = log_file.include?("rspec") ? rspec_bucket : cukes_bucket
vincentpaca / deis_errors1
Last active August 29, 2015 14:06
Deis wrong ruby versions
> cat Gemfile
ruby '2.1.2'
> deis run 'ruby -v'
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
> deis run 'rake'
/bin/bash: rake: command not found
vincentpaca /
Last active August 29, 2015 14:05
Deis and Google Cloud Compute Engine integration

fleetctl v0.7.1 fleet v0.7.1 deis v0.11.0

Setting Up Google Cloud utilities

  1. Install the gcloud utility by running curl | bash
  2. Follow the steps.
    • If using zsh, edit your .zshrc file near the bottom and find the lines that were added by the] gcloud util install. Replace with, do the same with completion.
vincentpaca /
Last active December 17, 2015 03:48
RVM, Ruby and Rails on Ubuntu


Open terminal then run: sudo apt-get install curl

Install RVM with curl -L | bash -s stable --auto

Reload bash with . ~/.bash_profile

Run: rvm requirements should be successful and give you a bunch of text

vincentpaca /
Last active December 15, 2015 07:49
RVM, Ruby and Rails on OSX

RVM, Ruby and Rails on OSX

  1. Download and install Xcode from the App Store.

  2. Download and install command line tools on Xcode. On the menu go to Preferences > Downloads > Install Command Line Tools

  3. Install homebrew like so:

     ruby -e "$(curl -fsSL"
vincentpaca / gist:1791197
Created February 10, 2012 17:45
Autotest & Notifications in Ubuntu
gem install autotest
gem install autotest-rails-pure
gem install autotest-notification
apt-get install libnotify-bin
vincentpaca / gist:1780816
Created February 9, 2012 16:02
Textmate + GEdit = GMate on Ubuntu, Ruby on Rails Text Editor
sudo add-apt-repository ppa:ubuntu-on-rails/ppa
sudo apt-get update
sudo apt-get install gedit-gmate
sudo apt-get install gedit-plugins
vincentpaca / gist:1696052
Created January 28, 2012 22:41
Bitly test
1.9.3p0 :002 > BITLY_CLIENT
=> #<Bitly::V3::Client:0xb653398 @default_query_opts={:login=>"yourusername", :apiKey=>"yourkey"}>
1.9.3p0 :001 > BITLY_CLIENT.shorten("")
=> #<Bitly::V3::Url:0xb5658c8 @client=#<Bitly::V3::Client:0xb653398 @default_query_opts={:login=>"yourusername", :apiKey=>"yourkey"}>, @short_url="", @long_url="", @user_hash="xFMlrA", @global_hash="LmvF", @new_hash=false, @user_clicks=nil, @global_clicks=nil, @title=nil, @created_by=nil, @aggregate_link=nil, @clicks_by_minute=nil>