Skip to content

Instantly share code, notes, and snippets.

View rosa
#!/usr/bin/env ruby
require 'rubygems'
require 'nokogiri'
require 'open-uri'
doc = Nokogiri::HTML(open('http://www.nsovocal.com/rosa/'))
puts doc.css('#episodio').to_s.gsub(/<\/?[^>]*>/, '').strip
@marioBonales
marioBonales / .bashrc
Created Apr 5, 2012
.bashrc for windows gitbash
View .bashrc
HISTCONTROL=ignoredups:ignorespace
shopt -s histappend
HISTSIZE=1000
HISTFILESIZE=2000
alias ls='ls --color=auto'
alias ll='ls -al'
alias vb2='cd /c/AppServ/www/viewbug/viewbug2/'
alias vb='cd /c/AppServ/www/viewbug/viewbug/'
alias ..="cd .."
@marioBonales
marioBonales / .bashrc
Created Jan 19, 2012
Default .bashrc for ubuntu
View .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
View .bash_profile.after
# Aliases
alias gs='git status'
alias ll='ls -l'
alias gd='git branch -d'
View gh.sh
#!/bin/sh
extra=""
if [[ "$1" != "" ]]; then
revnumber=$(git rev-parse $1)
extra="/commit/$revnumber"
fi
open `git config -l | sed -En 's/remote.origin.url=git(@|:\/\/)github.com(:|\/)(.+)\/(.+).git/https:\/\/github.com\/\3\/\4/p'`$extra
View .bashrc
##
# Your previous /Users/mariob/.profile file was backed up as /Users/mariob/.profile.macports-saved_2011-07-26_at_11:15:25
##
# MacPorts Installer addition on 2011-07-26_at_11:15:25: adding an appropriate PATH variable for use with MacPorts.
export PATH=$HOME/bin:/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
export EDITOR='mvim'
PROMPT_COMMAND=$PROMPT_COMMAND${PROMPT_COMMAND:+;}'PS1="\[\e[1;31m\]\u \[\e[0m\]\[\e[01m\]\t\[\e[0m\] \[\e[1;32m\]`~/bin/branch.sh`\[\e[0m\]\[\e[1;35m\]`~/bin/stash.sh`\[\e[0m\]\[\e[33m\]\w \[\e[0m\]\[\e[1m\]\$\[\e[0m\] "'
alias mysql='mysql5'