Skip to content

Instantly share code, notes, and snippets.

@tinti
tinti / UBI issues
Created April 30, 2012 13:12 — forked from maluta/UBI issues
# UBI mount
# source:
# http://mytechrants.wordpress.com/2010/01/20/ubiubifs-on-nandsim/
# http://www.plugcomputer.org/plugwiki/index.php/Enabling_UBIFS
modprobe nandsim first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 fourth_id_byte=0x15
cat /proc/mtd
ubiformat /dev/mtd0 -f system.ubi
modprobe ubi mtd=0
@tinti
tinti / gist:4032444
Created November 7, 2012 16:00
Rails 3.2.0 Capistrano
#require "bundler/capistrano"
require "rvm/capistrano"
# General
set :application, "test_capistrano"
set :domain, "test_capistrano.mxt.com.br"
set :user, "mxt"
set :runner, "mxt"
set :use_sudo, false
set :deploy_to, "/home/mxt/rails/#{application}"

Checkout repositories

  1. Poky
git clone git://git.yoctoproject.org/poky && cd poky
  1. OE metadata layers
@tinti
tinti / readSMS.py
Created September 5, 2013 21:56 — forked from underdoeg/readSMS.py
import serial
import time
from messaging.sms import SmsDeliver
ser=serial.Serial('/dev/ttyACM0', baudrate=9600, timeout=.1, rtscts=0)
def sendCommand(com):
ser.write(com+"\r\n")
time.sleep(2)
ret = []
#1: Download do kernel
#Faça o download do site oficial do kernel
wget -c http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.tar.bz2
#2: Instalar pacotes necessários para compilação:
#Se precisar de mais um pacote instale. Mas acredito que sejam apenas esses dai mesmo.
pacman -S gcc make libtools patch
#3: Descompactar o kernel
#A pasta preferencial é a /usr/src mas vc pode descompactar em outra pasta qualquer
#!/bin/sh
# I put all my dev stuff in here
export DEV_PREFIX=$HOME/Dev/
# Don't forget to adjust this to your NDK path
export ANDROID_NDK=${DEV_PREFIX}/android-ndk-r8d/
export CROSS_COMPILE=arm-linux-androideabi
@tinti
tinti / reverse-tether.sh
Created October 23, 2015 11:18 — forked from mrenouf/reverse-tether.sh
USB reverse tethering script (only tested on Ubuntu 12.04 with Galaxy Nexus)
#!/bin/bash
ADB="/home/mrenouf/bin/adb"
# We need root on the host to mess with networking
if [[ $(whoami) != "root" ]]; then
echo "You must be root to run this script!"
exit 1
fi;
@tinti
tinti / webm.md
Created February 22, 2016 15:18 — forked from ndarville/webm.md
4chan’s gudie to converting GIF to WebM - https://boards.4chan.org/g/res/41212767

Grab ffmpeg from https://www.ffmpeg.org/download.html

It's a command line tool which means you will have to type things with your keyboard instead of clicking on buttons.

The most trivial operation would be converting gifs:

ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm
  • -crf values can go from 4 to 63. Lower values mean better quality.
  • -b:v is the maximum allowed bitrate. Higher means better quality.
@tinti
tinti / http_get.go
Created April 5, 2016 17:19 — forked from ijt/http_get.go
Example of using http.Get in go (golang)
package main
import (
"fmt"
"http"
"io/ioutil"
"os"
)
func main() {