Skip to content

Instantly share code, notes, and snippets.

@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: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.
}.
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
#!/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
@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',
PART
{
// this is a sample config file, for determining a good file format for defining part parameters
// comment line - ignored by cfg parser
// empty lines, or lines without a '=' sign are also ignored
// all other lines are split at the '=' sign, and the left operand is used to know what parameter we are setting
// diferent parameters require data in different formats (see docs), and each module has it's own parameters (again, see docs)
// each assignment must be in a single line. Lines without assignments will be ignored. (You CAN turn on word wrap, though)
// each keyword here relates to an existing variable in the assigned module. If the keyword isn't found, it is ignored.
// conversely, if a keyword is left unassigned (as in not in the file), it will be initialized with it's default value
@xZise
xZise / gist:8729895
Last active August 29, 2015 13:55
n-body halving example
class CelestialBody {
double mass;
QVector3D position;
QVector3D velocity;
QVector3D f[];
}
@xZise
xZise / add_language.py
Created February 9, 2014 13:21
Script to add a language
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Automatically adds a new language to the KSP wiki. It follows
the instructions from http://wiki.kerbalspaceprogram.com/wiki/Kerbal_Space_Program_Wiki:Adding_a_New_Language :
1. Create MediaWiki:langlink-##, where ## is the two-letter language code. The content should be {{mw-langlink|##}}
2. Add {{mp-lang|##}} to Template:Main Page Layout/Language Box.
3. Add ** langlink-##|Language Name to MediaWiki:Sidebar under Languages.
4. Check the templates in Category:Language code templates if the language code needs to be added.
@xZise
xZise / data_template.py
Created February 12, 2014 17:14
Adding {{Data template used}}
#!/usr/bin/python
# -*- coding: utf-8 -*-
import pywikibot
import re
from pywikibot import textlib
site = pywikibot.getSite()
data_template = re.compile(".*/(Data|Box|RefFrame|Param)")
yes_all = False
for arg in pywikibot.handleArgs():
@xZise
xZise / update.py
Created February 12, 2014 17:18
Version update script
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Checks after an update of Kerbal Space Program if part configuration
files need to be updated, added or moved.
It first searches through the complete GameData/Squad/Parts directory
and catalogues all parts. It then compares every file with the existing
one on the wiki. If it doesn't exists, it searches for the infobox with
the part name to determine the current location on the wiki. It will