Skip to content

Instantly share code, notes, and snippets.

@xZise
xZise / partmove.py
Last active January 4, 2016 09:29
The bot's programming
#!/usr/bin/python
# -*- coding: utf-8 -*-
import pywikibot
import re
from pywikibot import textlib, page
import sys
parent_map = {
'Adapter': 'Structural',
'AirIntake': 'Utility',
#!/bin/bash
if [ -z "$1" ]; then
echo "Parameter missing"
exit
fi
atmo=`echo "-5000*l(10^-6)" | bc -l`
velocity="42" #dummy value
echo "Atmospheric height: $atmo m"
echo ""
echo "" > vtdata
G=6.674*10**-11
M=5.2915793*10**22
R=600000
plot sqrt((250*G*M)/((R+x)**2*1.2230948554874*exp(-x/5000)*0.2)) title 'Terminal' with lines
@xZise
xZise / gist:6883707
Created October 8, 2013 12:11
test script for testing if/when issues in kOS 0.83
until (false) {
set x to eta:apoapsis.
print x.
if eta:apoapsis > 10 { print "if.". }.
when eta:apoapsis > 10 then print "when.".
if x > 10 { print "ifx.".}.
when x > 10 then print "whenx.".
wait 5.
}.
@xZise
xZise / gist:4105652
Created November 18, 2012 14:52
LazyBones 1.0.1.0 complete log
This file has been truncated, but you can view the full file.
3:48:46 PM WARNING: TV-Browser was developed for Sun Java and may not run correctly with your Java implementation.
3:48:46 PM INFO: Using timezone Central European Time
3:48:46 PM INFO: Deleting expired TV listings...
3:48:46 PM INFO: Loaded plugin proxy /home/xzise/programs/TV Browser (test)/settings/3.2/GrowlPlugin.jar.proxy
3:48:46 PM INFO: Loaded plugin proxy /home/xzise/programs/TV Browser (test)/settings/3.2/I18NPlugin.jar.proxy
@xZise
xZise / gist:4090180
Created November 16, 2012 19:33
LazyBones 1.0.1.0 debug Log
8:31:37 PM LAZYBONES WARNING lazybones.TimerManager.getTimer: Unique program ID is null. Unable to find a timer for this program
8:31:37 PM LAZYBONES FINE org.hampelratte.svdrp.Connection.<init>: VDR is running with charset UTF-8
8:31:37 PM LAZYBONES FINE org.hampelratte.svdrp.Connection.send: --> LSTC
8:31:38 PM LAZYBONES FINE org.hampelratte.svdrp.Connection.send: <-- 250 1 Das Erste HD;ARD:362000:C0M256:C:6900:6010=27:6020=deu@3,6021=mis@3;6022=deu@106:6030;6031=deu:0:11100:41985:1051:0
2 ZDF HD;ZDFvision:370000:C0M256:C:6900:6110=27:6120=deu@3,6121=mis@3,6123=mul@3;6122=deu@106:6130;6131=deu:0:11110:1:1079:0
3 SF2;Bonus:746000:C0M64:C:6900:502=2:503=deu@3,504=eng@3:506:0:22264:40984:231:0
4 TELE 5;Frei deutsch:466000:C0M256:C:6900:702=2:703=deu@3:706:0:22006:40984:216:0
5 SWR Fernsehen BW;ARD:346000:C0M256:C:6900:801=2:802=deu@3,803=mis@3;806=deu@106:804:0:28113:41985:1101:0
6 SAT 1;Pro7 & Sat.1:121000:C0M64:C:6900:202=2:203=deu@3;205=deu@106:206:0:17500:40984:1107:0
7 RTL Television,RTL;RTL:113000:C0M64:
@xZise
xZise / gist:4007885
Created November 3, 2012 16:53
LazyBones 1.0.0.0 Log
5:14:23 PM LAZYBONES FINE org.hampelratte.svdrp.Connection.<init>: VDR is running with charset UTF-8
5:14:23 PM LAZYBONES FINE org.hampelratte.svdrp.Connection.send: --> LSTC
5:14:23 PM LAZYBONES FINE org.hampelratte.svdrp.Connection.send: <-- 250 1 Das Erste HD;ARD:362000:C0M256:C:6900:6010=27:6020=deu@3,6021=mis@3;6022=deu@106:6030;6031=deu:0:11100:41985:1051:0
2 ZDF HD;ZDFvision:370000:C0M256:C:6900:6110=27:6120=deu@3,6121=mis@3,6123=mul@3;6122=deu@106:6130;6131=deu:0:11110:1:1079:0
3 SF2;Bonus:746000:C0M64:C:6900:502=2:503=deu@3,504=eng@3:506:0:22264:40984:231:0
4 TELE 5;Frei deutsch:466000:C0M256:C:6900:702=2:703=deu@3:706:0:22006:40984:216:0
5 SWR Fernsehen BW;ARD:346000:C0M256:C:6900:801=2:802=deu@3,803=mis@3;806=deu@106:804:0:28113:41985:1101:0
6 SAT 1;Pro7 & Sat.1:121000:C0M64:C:6900:202=2:203=deu@3;205=deu@106:206:0:17500:40984:1107:0
7 RTL Television,RTL;RTL:113000:C0M64:C:6900:102=2:103=deu@3;105=deu@106:106;110=deu:0:12003:40984:1089:0
8 RTL 2;RTL:113000:C0M64:C:6900:202=2:203=deu@3:206:0:12020:4
@xZise
xZise / gist:2369546
Created April 12, 2012 17:42
Faster String → Long conversion
public static Long tryAndGetLong(String string, int radix) {
try {
return Long.parseLong(string, radix);
} catch (NumberFormatException e) {
return null;
}
}
private static final String DIGITS = "0123456789";
private static final String UPPER_DIGIT_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
@xZise
xZise / Resolution.java
Created January 10, 2012 16:50
Resolution to Format
// Another way to handle the format related stuff
public class Resolution {
public static final Resolution FULL_HD = new Resolution(1920, 1080, "Full HD");
public static final Resolution HALF_HD = new Resolution(1280, 720, "Half HD");
public static final Resolution PAL = new Resolution( 720, 576, "PAL"); // Maybe 702?
public static final Resolution PALplus = new Resolution(1024, 576, "PALplus");
private static final RESOLUTIONS[] resolutions = new Resolution[] { FULL_HD, HALF_HD, PAL, PALplus };
@xZise
xZise / example.js
Created November 16, 2011 10:53
Example methods configuration file
function name(player, event, parameters) {
return player.getName();
}