Skip to content

Instantly share code, notes, and snippets.

Thomas Rodriguez trodrigu

Block or report user

Report or block trodrigu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
trodrigu / find_path.rb
Created Aug 23, 2018
Longest increasing path in a matrix
View find_path.rb
def find_longest_rising_route(matrix)
matrix_with_locations = do |row, index| do |el, inner_index|
[index, [inner_index, el]]
sorted_with_locations =
trodrigu / make_custom.applescript
Created Jul 23, 2018
make custom dog name in illustrator
View make_custom.applescript
set saveLocation to ((path to desktop) as string)
set fullPath to saveLocation & "newDogName"
set newFilePath to fullPath & ".svg"
log fullPath
tell application "Adobe Illustrator"
make document with properties {name:"dogName"}
set theFrame to (make new text frame in current document with properties {contents:"Chi Chi", kind:area text, name:"notes"})
make new character style in document 1 with properties {name:"dog Name Character Style"}
trodrigu / solution_to_rails_bundle_installation
Last active May 27, 2016
Solves problem with libv8, therubyracer and event_machine
View solution_to_rails_bundle_installation
gem install eventmachine -v '1.0.7' -- --with-cppflags=-I/usr/local/opt/openssl/include
gem uninstall libv8
gem install therubyracer -v YOUR_RUBY_RACER_VERSION
gem install libv8 -v YOUR_VERSION -- --with-system-v8
# if issue with capybara-webkit
brew install qt
trodrigu /
Created Mar 18, 2016
Shell script to remove lines from top of file
# Make sure to chmod +x
ag 'Created (?=by)' -l | while read file
sed -i .bak '1,17d' $file
rm "$file.bak"
View 213.rb
class Rule90
def initialize input
@input = input.split(//).map(&:to_i)
def get_next target_index, input
input[target_index + 1]
def get_prev target_index, input
View rad
echo "Enter app name "
read name
echo "Your app's name is: $name"
echo "Installing..."
rails new $name -T -d postgresql
cd $name
echo 'gem "rspec-rails", :group => [:development, :test]' >> Gemfile
rails g rspec:install
echo 'gem "devise"' >> Gemfile

Rails Models

Generating models

$ rails g model User


You can’t perform that action at this time.