Skip to content

Instantly share code, notes, and snippets.

Cameron Zemek grom358

Block or report user

Report or block grom358

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View function_replacer.php
#!/usr/bin/php
<?php
/**
* PHP Token
*/
class Token {
public $type;
public $text;
public $lineNo;
public $colNo;
@grom358
grom358 / Formatter.php
Last active Dec 24, 2015
PHP Code Formatter
View Formatter.php
#!/usr/bin/php
<?php
/**
* PHP Token
*/
class Token {
public $type;
public $text;
public function __construct($type, $text) {
@grom358
grom358 / ksp_ascent_sim.js
Last active Dec 21, 2015
Simulate ascents in KSP
View ksp_ascent_sim.js
var THRUST = 5;
var PLANET_RADIUS = 200000;
var PLANET_MASS = 9.7600236e20;
var PLANET_SIDEREAL_VELOCITY = 9.0416;
var G = 6.67384e-11;
var ISP = 350;
var FUEL_RATE = THRUST / (ISP * 9.81);
var TARGET_ALT = 40000;
var DRY_MASS = 0.39875;
var FUEL_MASS = 0.191025;
@grom358
grom358 / ksp_rename.php
Last active Dec 17, 2015
A PHP script for renaming the part folder names for better ordering when viewing parts in VAB/SPH and also for finding the part in Windows Explorer
View ksp_rename.php
<?php
// Category
// Pod is the first tab but is last for purpose of category numbers
$categoryNames = array('Propulsion', 'Control', 'Structural', 'Aero', 'Utility', 'Science', 'Pods');
$subcategoryOrder = array();
// Order of pod parts
// Pods are not separated into subcategory
@grom358
grom358 / dominion.js
Created Aug 21, 2012
Dominion Simulator for the base set
View dominion.js
// https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/forEach
if ( !Array.prototype.forEach ) {
Array.prototype.forEach = function(fn, scope) {
for(var i = 0, len = this.length; i < len; ++i) {
fn.call(scope || this, this[i], i, this);
}
}
}
// https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/indexOf
You can’t perform that action at this time.