Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am brunocruzcoelho on github.
* I am brunocoelho (https://keybase.io/brunocoelho) on keybase.
* I have a public key ASCzeWbYmCc27jlnGV4XbVAvpDz1VTamjNVPIyOaZW_Mmwo
To claim this, I am signing this object:
for i in `gem list --no-versions`; do gem uninstall -aIx $i; done
@brunocruzcoelho
brunocruzcoelho / simple-http-server.sh
Created October 24, 2014 08:42
simple http server in pyhton for a mac
cd $WORKING_DIR
python -m SimpleHTTPServer
@brunocruzcoelho
brunocruzcoelho / create_mavericks_usb_installation_drive.sh
Created April 8, 2014 20:28
create mac osx mavericks usb installation drive
#
# - Install OS X Mavericks.app must be in /Applications
#
# - Usb disk must be formated with Mac OS Extended (Journaled) and named Untitled
#
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction
#
# output:
#
@brunocruzcoelho
brunocruzcoelho / find unused cucumber steps definitions.sh
Created February 27, 2014 15:15
find unused cucumber steps definitions
cucumber --dry-run -f stepdefs
@brunocruzcoelho
brunocruzcoelho / get-location-2.html
Created January 24, 2014 10:57
html - get location
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Geolocation accuracy</title>
<script type="text/javascript">
// cache for changes
var lastPosition = null;
function initialize() {
@brunocruzcoelho
brunocruzcoelho / get-location.html
Created January 24, 2014 10:56
html - get location
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8>
<meta name="viewport" content="width=620">
<title>HTML5 Demo: geolocation</title>
</head>
<body>
<section id="wrapper">
<header>
@brunocruzcoelho
brunocruzcoelho / server.js
Created January 24, 2014 10:55
static file server in nodejs
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@brunocruzcoelho
brunocruzcoelho / send-publick-key-to-a-remote-machine.sh
Created January 24, 2014 10:52
send publick key to a remote machine
cat ~/.ssh/id_rsa.pub | ssh USERNAME@REMOTE_MACHINE 'cat >> .ssh/authorized_keys'
@brunocruzcoelho
brunocruzcoelho / rubocop-open-files-with-offences-with-sublime-text.sh
Created January 24, 2014 10:50
rubocop open files with offences with sublime text
bundle exec rubocop --format files | xargs subl