Skip to content

Instantly share code, notes, and snippets.

@tinti
tinti / gist:1627086
Created January 17, 2012 15:34
Fast file sharing over HTTP with Python
Simply run:
python -m SimpleHTTPServer
@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:2659667
Created May 11, 2012 13:36
Open file in Vim and go to a specific line
# Open 'myfile' and go to line 123
vim myfile +123
@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 / python_gpsd.py
Last active September 6, 2020 21:38
Get lat/long from gpsd with python
# install gpsd gps-clients and python
import gps
gpsd = gps.gps()
gpsd.stream(gps.WATCH_ENABLE|gps.WATCH_NEWSTYLE)
for report in gpsd:
if report['class'] == 'TPV':
print report['lat']
@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