Skip to content

Instantly share code, notes, and snippets.

Roberto Rivera rriveras

Block or report user

Report or block rriveras

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
View snippets.sh
# MYSQL import, this let you know where it goes the import by
# looking what is the last table that print
mysql -uroot mydatabase_development -A
show tables;
# UNIX command and tricks
# Search string in directory
# ref: http://stackoverflow.com/a/16957078
grep -rnw --exclude-dir=node_modules . -e "string-pattern"
# Find who is using some port, in this example, the port is `3000`
@rriveras
rriveras / OSX_launchctl_unload.txt
Created Sep 5, 2011
Stop a process in OSX loaded via launchctl
View OSX_launchctl_unload.txt
launchctl unload -w ~/Library/LaunchAgents/com.danga.memcached.plist
@rriveras
rriveras / install_nokogiri_for_osx.sh
Created Aug 5, 2011
Quick way to install nokogiri and dependencies in OSX Snow Leopard
View install_nokogiri_for_osx.sh
# installation of libxml 2.7.7 or later
brew install libxml2
brew link libxml2
# install libxslt from source
# download the source
wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz
# unzip the source
tar -zxvf libxslt-1.1.26.tar.gz
# move to the unzipped folder
@rriveras
rriveras / console_kill_service
Created Jun 22, 2011
Just kill services managed by launchd in OSX
View console_kill_service
sudo kill -9 <PID>
View gist:447865
# Create a local branch, push and then clone the branch. With this,
# you can make a branch local and remote with tracking
git branch experimental
# Now, push this new local branch to remote repo
git push origin experimental
# Check if the new branch was created in the remote repo
git branch -r
# This added your local branch to remote repo, but without tracking. To do that,
# delete your local branch. Note that we gonna delete our local branch
# WITHOUT merging changes, so it's very important to use the capital D in the argument
@rriveras
rriveras / gist:432534
Created Jun 10, 2010
ROR environment installation in a fresh Ubuntu (10.04)
View gist:432534
# ROR environment installation in a fresh Ubuntu (10.04)
# Latest stable ruby (1.8.7)
sudo apt-get install irb libopenssl-ruby libreadline-ruby rdoc ri ruby ruby-dev
# Install Rubygems
cd /usr/local/src
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.6.tgz
tar xzvf rubygems-1.3.6.tgz
cd rubygems-1.3.6
sudo ruby setup.rb
You can’t perform that action at this time.