Skip to content

Instantly share code, notes, and snippets.

View klebervirgilio's full-sized avatar
🎯
Focusing

Kleber Correia klebervirgilio

🎯
Focusing
View GitHub Profile
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"strconv"
Downgrade
http://www.addictivetips.com/mobile/how-to-downgrade-htc-desire-hd-to-root-it-after-ota-update/
How to root the HTC Desire HD
http://www.youtube.com/watch?v=zY8TFZ2Owk0
Pretty ROM
@klebervirgilio
klebervirgilio / HTC DHD Recovery.log
Created July 14, 2012 18:23
HTC DHD Recovery.log
Starting recovery on Sun Jan 6 00:00:04 1980
can't open /dev/tty0: No such file or directory
framebuffer: fd 3 (480 x 800)
ClockworkMod Recovery v5.0.2.0
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null)
1 /recovery emmc /dev/block/mmcblk0p21 (null)
2 /boot emmc /dev/block/mmcblk0p22 (null)
3 /cache ext3 /dev/block/mmcblk0p27 (null)
Você pode, por favor, me adicionar no Gtalk ou no Msn??
Meu e-mail é klebervirgilio@gmail.com.
Kleber,
Obrigado!
@klebervirgilio
klebervirgilio / gist:3515268
Created August 29, 2012 16:30
Reverse words
import sys
test_cases = open(sys.argv[1], 'r')
for test in test_cases:
result = test.split(' ')
result.reverse()
index, buf = 0, ''
module A
class Payment
def foo
p "Payment#foo"
end
end
end
module A
class CC < Payment
@klebervirgilio
klebervirgilio / data-html-chosen.jquery.js
Created November 10, 2015 04:27
Adds the ability to render html in the list.
$ = jQuery;
$.fn.extend({
chosenDataHtml: function(options) {
return this.each(function(input_field) {
var $this = $(this),
formatSelection = options['formatSelection'] || function(e, data) {
var chosen = data.chosen,
sudo ifconfig en1 ether `openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`
@klebervirgilio
klebervirgilio / class.js
Created January 10, 2013 07:39
JS Class
var Class = function(parent){
var klass = function(){
this.init.apply(this, arguments);
}
if(parent){
var subclass = function(){};
subclass.prototype = parent.prototype;
klass.prototype = new subclass;
# Based on robbyrussell's theme, with host and rvm indicators. Example:
# @host ➜ currentdir rvm:(rubyversion@gemset) git:(branchname)
# Get the current ruby version in use with RVM:
if [ -e ~/.rvm/bin/rvm-prompt ]; then
RUBY_PROMPT_="%{$fg_bold[blue]%}[%{$fg[green]%}\$(~/.rvm/bin/rvm-prompt)%{$fg_bold[blue]%}]%{$reset_color%} "
fi
# Get the host name (first 4 chars)
HOST_PROMPT_="%{$fg_bold[red]%}➜ %{$fg_bold[cyan]%}%0~ "