Skip to content

Instantly share code, notes, and snippets.

@Xyphis12
Xyphis12 / Dice.java
Last active December 19, 2015 05:49
com.dtalley11.dice
package com.dtalley11.dice;
import java.util.*;
public class Dice {
public int[] Diceroll(int size, int num) {
int[] rolls = new int[num+1];
for(int loopa = num; loopa > 0; loopa = loopa-1)
Random generator = new Random();
int finroll = generator.nextInt(size) + 1;
rolls[num+1] = finroll
@Xyphis12
Xyphis12 / 2nd-init
Last active December 21, 2015 18:28
2nd-init POC for kyocera Rise
Replace file with
https://github.com/Hashcode/android_device_safestrap-common/blob/master/sbin/2nd-init
@Xyphis12
Xyphis12 / info
Created August 27, 2013 05:21
from http://arearom.com/devuploads/motorhead/public/info Info script to help troubleshooting and porting
#!/system/bin/sh
#from http://arearom.com/devuploads/motorhead/public/info
#by Motorhead
mem=$(cat /proc/meminfo | grep -E 'MemTotal' | sed -e 's/MemTotal: //' -e 's/kB//')
free=$(cat /proc/meminfo | grep -E 'MemFree' | sed -e 's/MemFree: //' -e 's/kB//')
echo 'Checking to see if you are running as root'
sleep 2s
echo ''
if [ `id | cut -d= -f3 | cut -d\( -f1` = 0 ]
then
@Xyphis12
Xyphis12 / piebot.py
Last active December 23, 2015 15:39
Supports multiple channels and a command to join channels while connected
import sys
import socket
###SETUP###
# Edit These options as you need
botnick = 'botnick' # Nickname of the bot
server = "irc.network.net" # Server to connect to
channels = ["#channel1","#channel2"] # List of channels to join once connected
port = 6667 # Port used to connect with
prefix = "-" # Prefix to determine what is a command
@Xyphis12
Xyphis12 / recovery.log
Last active June 10, 2024 16:06
recovery.log
Starting TWRP 2.6.3.0 on Sun Jan 6 00:00:04 1980
I:=> hardware id from cpuinfo: 'GELATO board'
I:=> serial from cpuinfo: '0000000000000000'
I:Single storage only.
I:No internal storage defined.
I:No storage defined, defaulting to /sdcard.
TW_NO_REBOOT_BOOTLOADER := true
TW_POWER_BUTTON := 107
I:Lun file '/sys/devices/platform/usb_mass_storage/lun0/file'
Starting the UI...Pixel format: 320x480 @ 16bpp
@Xyphis12
Xyphis12 / readme.md
Last active December 31, 2015 09:49
SBPlanets -- A Crappy Starbound script for keeping track of planets using XML WORK IN PROGRESS

SBPlanets

A Crappy Starbound script for keeping track of planets using XML

Getting Python

SBPlanets should work on both Windows and Unix based platforms (including Linux), and requires python 2.7 which can be found Directly from their website

Running SBPlanets

@Xyphis12
Xyphis12 / machups.py
Last active January 4, 2016 13:39
Pokemon Type Matchup Tool
# Pokemon Type Matchups Tool
types = {
'bug' : {
'attack': {
'doublex': ('psychic', 'grass', 'dark'),
'halfx': ('fighting', 'fire', 'flying', 'ghost', 'poison', 'steel', 'fairy'),
'zerox': ()
},
'defend': {
'halfx': ('fighting', 'grass', 'ground'),
@Xyphis12
Xyphis12 / pssdoc.md
Last active January 28, 2024 07:47
General documentation for modifying Pokemon Showdown
@Xyphis12
Xyphis12 / abilities.js
Last active August 29, 2015 13:56
adding opertunist
"opportunist": {
desc: "When the user uses a consumable, it regenerates once",
id: "opportunist",
name: "Opportunist",
onResidualOrder: 26, // Don't know what this is for
onResidualSubOrder: 1, // This either
onResidual: function(pokemon) {
if (!pokemon.item) {
// If the pokemon does not have an Item (e.g. it got consumed) Will probably have to figure somethign out for if the pokemon didn't have an iten to start
pokemon.setItem(pokemon.lastItem);
/**
* System commands
* Pokemon Showdown - http://pokemonshowdown.com/
*
* These are system commands - commands required for Pokemon Showdown
* to run. A lot of these are sent by the client.
*
* If you'd like to modify commands, please go to config/commands.js,
* which also teaches you how to use commands.
*