Skip to content

Instantly share code, notes, and snippets.

@ijt
ijt / http_get.go
Last active August 21, 2024 05:11
Example of using http.Get in go (golang)
package main
import (
"fmt"
"io"
"log"
"net/http"
"os"
)
@underdoeg
underdoeg / readSMS.py
Created October 4, 2011 18:02
retreive sms via python, serial connection and AT commands
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 = []
@tinti
tinti / gist:1627086
Created January 17, 2012 15:34
Fast file sharing over HTTP with Python
Simply run:
python -m SimpleHTTPServer
@austinmarton
austinmarton / sendRawEth.c
Created February 27, 2012 08:40
Send a raw Ethernet frame in Linux
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <stdio.h>
UBI issues
modprobe mtd
modprobe mtdblock
modprobe mtdram total_size=200000 erase_size=128
modprobe ubi
ubiformat /dev/mtd0
ubiattach /dev/ubi_ctrl -m 0
ubimkvol /dev/ubi0 -N VOLUME -s 192MiB
@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
@mikluko
mikluko / etc_monit_conf.d_local
Created May 21, 2012 11:12
Monit config to monitor and keep alive ppp connection
set mailserver localhost
set daemon 120 with start delay 240
set logfile syslog facility log_daemon
set httpd port 2812
allow localhost
set alert noreply@example.com
check host internet with address 80.254.111.254
if failed icmp type echo count 5 with timeout 30 seconds
@mrenouf
mrenouf / reverse-tether.sh
Created August 11, 2012 23:01
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 / 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}"
@errordeveloper
errordeveloper / setup.md
Created November 11, 2012 20:41 — forked from 17twenty/gist:2712354
Setting-up Yocto for MACHINE=beaglebone

Checkout repositories

  1. Poky
git clone git://git.yoctoproject.org/poky && cd poky
  1. OE metadata layers