Skip to content

Instantly share code, notes, and snippets.

View maluta's full-sized avatar

Tiago Maluta maluta

View GitHub Profile
[0, 132, 136, 143, 156, 174, 133, 144, 150, 124, 150, 135, 150, 149, 131, 131, 153, 156, 136, 137, 138, 127, 119, 148, 155, 134, 115, 142, 148, 155, 145, 142, 148, 159, 142, 135, 144, 145, 138, 132, 138, 152, 154, 159, 145, 127, 128, 145, 127, 153, 153, 159, 149, 159, 160, 128, 139, 136, 137, 145, 138]
@maluta
maluta / Foo.scala
Created September 7, 2012 03:10
Create Foo.scala
object Foo {
def main(args: Array[String]) {
print("SC");
}
}
echo "Please select your test function"
echo " 1 - CANAL 0"
echo " 2 - CANAL 7"
echo " 3 - CANAL 8"
echo " 4 - CANAL 15"
echo ""
read -p "Please make your choice:" cmd
case $cmd in
<intent-filter>
<action
android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
<category
android:name="android.intent.category.HOME" />
<category
android:name="android.intent.category.DEFAULT" />
</intent-filter>
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
@maluta
maluta / sena.py
Created April 26, 2012 15:34 — forked from alvesjnr/sena.py
Quantos sorteios para você ganhar na mega sena?
import random
my_numbers = set(random.sample(xrange(1,61),6))
if __name__ == '__main__':
count = 1
while my_numbers != set(random.sample(xrange(1,61),6)):
count += 1
print count
#!/usr/bin/env python
#-*- coding: rot13 -*-
qrs qrpbqvsvpn(f):
erghea f.rapbqr('rot13')
vs __anzr__ == '__main__':
cevag qrpbqvsvpn("Uryyb Jbeyq")
import sys
import time
def progress(message,s=2.0):
for i in range(1,101):
_t = s/100.0
time.sleep(_t)
sys.stdout.write("\r%s%d%%" % (message,i))
sys.stdout.flush()
import sys
import time
s = ['|', '\\','-', '/']
for i in range(101):
time.sleep(0.1)
sys.stdout.write("\r%d%%" % i)
sys.stdout.flush()
#include <stdio.h>
#include <stdlib.h>
send(to, from, count)
register short *to, *from;
register count;
{
register n = (count + 7) / 8;
switch(count % 8) {
case 0: do { *to = *from++;