Skip to content

Instantly share code, notes, and snippets.

View bvolpato's full-sized avatar
:shipit:
ship it

Bruno Volpato bvolpato

:shipit:
ship it
View GitHub Profile
@bvolpato
bvolpato / cmd.sh
Created April 1, 2016 20:35
Open and Join Hangouts
# Open and Join Hangout automatically on Mac OS X + Google Chrome :)
# It's good to join standup every day automatically with Automator.
open "https://plus.google.com/hangouts/_/domain.com/user?authuser=<email_to_join_with>"
osascript -e "
tell application \"Google Chrome\"
execute front window's active tab javascript \"!function(){function e(e){var t=document.createElement('script');t.setAttribute('src','https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js'),t.addEventListener('load',function(){var t=document.createElement('script');t.textContent='('+e.toString()+')();',document.body.appendChild(t)},!1),document.body.appendChild(t)}function t(){function e(e,t){evt=document.createEvent('MouseEvents'),evt.initMouseEvent(t,!0,!0,document.defaultView,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(evt)}function n(t){e(t,'mouseover'),e(t,'mousedown'),e(t,'mouseup'),e(t,'mouseout')}var o=30;\$('div[role=button]').each(function(e,t){0>=o||\$(t).html().indexOf('Join')>=0&&(n(t),o=0)}),o-- >0&&setTimeout
@bvolpato
bvolpato / cmd.sh
Created April 1, 2016 21:08
OpenJDK 8 on Ubuntu 14.04
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:openjdk-r/ppa -y
sudo apt-get update
sudo apt-get install openjdk-8-jdk -y
sudo update-alternatives --config java
sudo update-alternatives --config javac
# git credit
git commit --amend --author "Author <email>" -C HEAD
# git rebase for branch
git rebase -i {base-branch}
@bvolpato
bvolpato / Contract Killer 3.md
Created April 14, 2016 20:11 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@bvolpato
bvolpato / whiteboardCleaner.md
Created April 14, 2016 20:20 — forked from lelandbatey/whiteboardCleaner.md
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@bvolpato
bvolpato / business-models.md
Created April 14, 2016 20:25 — forked from ndarville/business-models.md
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@bvolpato
bvolpato / latency.txt
Created April 14, 2016 20:29 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@bvolpato
bvolpato / gist:f64235c52866ebb235c65dc75f9f9e18
Created April 14, 2016 21:56 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@bvolpato
bvolpato / netspeed.sh
Created April 20, 2016 04:34
netspeed.sh
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2013-07-11
#
# _______________| netspeed : check download speed via command line.
#
# Usage: netspeed [tokyo, london, usw, use, east, west, URL]
# ^default U.S. west coast.
# [ -speed_KB/sec ]
# ^negation activates the Mbps converter.
#