Skip to content

Instantly share code, notes, and snippets.

View jorgebraz's full-sized avatar

Jorge Braz jorgebraz

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jorgebraz on github.
  • I am jorgebraztd (https://keybase.io/jorgebraztd) on keybase.
  • I have a public key ASASuMzETGHRwaVfQbezeMDiN5ptmy4n0DwyRW2hhKS3SAo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am jorgebraz on github.
  • I am jorgebraz (https://keybase.io/jorgebraz) on keybase.
  • I have a public key ASCQYCok0zP1SBvIII3K2O_xbWHbuLcmyJToYpZCiH7y2wo

To claim this, I am signing this object:

@jorgebraz
jorgebraz / ssh_autocomplete.sh
Created June 3, 2012 14:09
ssh autocomplete /etc/hosts
complete -W "$(sed 's/;.*//;' /etc/hosts | awk ' /^[[:digit:]]/ {$1 = "";print tolower($0)}')" ssh
@jorgebraz
jorgebraz / secho.sh
Created April 4, 2012 03:35
VirtualBox Headless VM helper
#!/bin/bash
# SGR (Select Graphic Rendition) parameters
# Code Effect Note
# 0 Reset / Normal all attributes off
# 1 Bright (increased intensity) or Bold
# 2 Faint (decreased intensity) not widely supported
# 3 Italic: on not widely supported. Sometimes treated as inverse.
# 4 Underline: Single
# 5 Blink: Slow less than 150 per minute
@jorgebraz
jorgebraz / ajax_request.html
Created March 13, 2012 22:16
Pedido ajax usando jQuery
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script>
<script>
// var query = A palavra de pesquisa, não sei onde a estás a ir buscar...
$.ajax(
{
url: 'http://oteusite.qqcoisa.pt/response.php',
type: 'get', // -> $_GET no PHP
data: {
query: query // -> $_GET['query'] no PHP;