This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.os.Handler; | |
public class SplashScreenActivity extends Activity { | |
private Handler splashTimeout = new Handler(); | |
private Class<?> cls; | |
private long time; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# ROT: encode and decode letters and numbers using ROT13 and ROT5 | |
# Author: Andrea Stagi <[email protected]> | |
# License: c'mon default header, don't be silly :D | |
def rot_encode(clr_str): | |
rot_chars = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def RPN(operation): | |
s = [] | |
for el in operation.split(" "): | |
if el.isdigit(): | |
s.append(el) | |
elif re.match("[+,-,*,/]", el) and len(s) > 1: | |
s.append(eval("%s %s %s" % ( s.pop(), el , s.pop() ))) | |
else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: latin-1 -*- | |
# PulcinoPyo: generate a "Pulcino Pio" style (??) song! | |
# Author: Andrea Stagi on vacation <[email protected]> | |
# License: c'mon default header, don't be silly :D | |
#Our type Animal | |
class Animal: | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install Apache Ant (http://ant.apache.org/) | |
2. Download the Android SDK from http://developer.android.com/sdk/index.html if you don't have it yet | |
3. Extract the package somewhere (I placed it in my home directory /home/andrea/android-sdk-linux_x86) | |
4. Set ANDROID_SDK environment variable with the path where you placed the SDK folder | |
5. Run buildall.sh to build the .apk | |
6. Run run.sh to launch Turpial on your device | |
7. In case you need to restart adb, run restartadb.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Funny script by Arul John | |
#Visit http://aruljohn.com/notes/babyrocker.html | |
while [1 = 1] do | |
#eject cdrom | |
eject |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shorty | |
url = 'http://google.com' | |
short_service = shorty.Isgd() | |
st = short_service.shrink(url) | |
print st |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
valac python.vapi pyembtest.vala -X -I. -X -I/usr/include/python2.6 -X -lpython2.6 -o pyembtest |
NewerOlder