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
# 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:
grep -rnw --exclude-dir=node_modules . -e "string-pattern"
# Find who is using some port, in this example, the port is `3000`
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 /
Created Aug 5, 2011
Quick way to install nokogiri and dependencies in OSX Snow Leopard
# installation of libxml 2.7.7 or later
brew install libxml2
brew link libxml2
# install libxslt from source
# download the source
# unzip the source
tar -zxvf libxslt-1.1.26.tar.gz
# move to the unzipped folder
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 / 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
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.