Skip to content

Instantly share code, notes, and snippets.

View racerxdl's full-sized avatar
🔒
Invincible for those who don't have an screwdriver.

Lucas Teske racerxdl

🔒
Invincible for those who don't have an screwdriver.
View GitHub Profile
import shutil
import os, os.path
count = 1
eps = []
seasons = [ 16 ,24 , 24 ]
doubles = []
s = 1
for numep in seasons:
print "Season %02d Episodes %03d" % (s,numep)
@racerxdl
racerxdl / vmail.sh
Created November 17, 2013 18:13
Backup Email Script
#!/bin/bash
LOCKFILE=/tmp/bkpvmail
if [ -e ${LOCKFILE} ] && kill -0 `cat ${LOCKFILE}`
then
echo "Já rodando!"
exit
fi
trap "rm -f ${LOCKFILE}; exit" INT TERM EXIT
echo $$ > ${LOCKFILE}
@racerxdl
racerxdl / VPXEncoder.cpp
Created December 28, 2013 21:19
A simple VPX Encoder Class based on VP8 SDK example
/*
* VPXEncoder.h
*
* Created on: 28/12/2013
* Author: lucas
* Based on: http://www.webmproject.org/docs/vp8-sdk/example__simple__encoder.html
* An part of StepFever project.
*/
@racerxdl
racerxdl / extralist.py
Created January 22, 2014 01:34
Extra Keys Directory List Generator for Fiesta 2
#!/usr/bin/env python
def HexRange(start,end):
a = int(start, 16)
b = int(end, 16)
return range(a,b)
f = open("extralist","w")
@racerxdl
racerxdl / NX2 Score Description
Created January 23, 2014 23:26
This is the NX2 Score stuff. These are how they are calculated in NX2 Game.
So for NX, NX2, NXA(Not Tested) the score works like that.
We have a few defined integer globals:
SCORE_PERFECT = 1000 // This is if you hit a perfect
SCORE_GREAT = 500
SCORE_GOOD = 100
SCORE_BAD = -200
SCORE_MISS = -500
SCORE_MISS_LONGNOTE = -300
SCORE_NIGHTMARE_BONUS = 500000 // If the music is double, you get this more at score.
@racerxdl
racerxdl / axispipe.py
Last active August 29, 2015 13:56
A Joystick Axis Pipe. This is the Arduino code that receives through a serial interface the commands and generate the PPM Pulses.
import serial
import pygame
import struct
import os
import sys
import time
class TextPrint:
def __init__(self):
self.reset()
self.font = pygame.font.Font(None, 30)
@racerxdl
racerxdl / mysql.sh
Created February 27, 2014 02:20
MySQL Backup Script
#!/bin/bash
LOCKFILE=/tmp/bkpmysql
if [ -e ${LOCKFILE} ] && kill -0 `cat ${LOCKFILE}`
then
echo "Já rodando!"
exit
fi
trap "rm -f ${LOCKFILE}; exit" INT TERM EXIT
echo $$ > ${LOCKFILE}
@racerxdl
racerxdl / hc06config.ino
Created March 15, 2014 19:40
HC-06 Module Configurator - Arduino Code
/*
HC-06 Module Configurator
This Arduino Code Configures the Baudrate, name and PIN to a HC-06 Bluetooth module on Serial port 0
By: Lucas Teske
*/
#define BAUDRATE 115200 // Valid values: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
@racerxdl
racerxdl / hc06config.py
Created March 15, 2014 19:48
HC-06 Module Configurator through Serial Port
import serial
import time
PORT = "/dev/ttyUSB0" # If windows, change it to COMX
PINCODE = "1234" # Change it to your PIN
DEVNAME = "mybt" # Change it to your device name
BAUDRATE= 115200 # Change it to your baudrate
@racerxdl
racerxdl / offsets.txt
Last active August 29, 2015 13:57
Pump It Up Fiesta 2 Save Decrypter/Encrypter
#Name # offset length datatype
adler32 # 0x00 0x04 LE int
adlerSeed # 0x04 0x04 LE int
playerID # 0x08 0x08 string (null term)
region # 0x14 0x04 LE int
avatarID # 0x18 0x04 LE int
level # 0x1C 0x04 LE int
totalCalories # 0x20 0x04 LE float
totalV02 # 0x24 0x04 LE float
numberRunningSteps # 0x28 0x08 LE int64