Skip to content

Instantly share code, notes, and snippets.

View klightspeed's full-sized avatar

Ben Peddell klightspeed

View GitHub Profile
<audio controls>
<source src="https://sites.google.com/a/smbtsv.catholic.edu.au/bpeddell-test-audio/drums.mp4" type="audio/mp4"></source>
</audio>
@klightspeed
klightspeed / gist:1a234599d699167255bb
Created August 29, 2014 12:15
Traceroute from Aus to CCP
# traceroute -T -p443 forums.eveonline.com
traceroute to forums.eveonline.com (87.237.39.162), 30 hops max, 60 byte packets
1 192.168.200.1 (192.168.200.1) 0.560 ms 0.673 ms 0.808 ms
2 lo0.bne-pipe-bng2.iinet.net.au (203.215.9.249) 39.954 ms 41.346 ms 43.354 ms
@klightspeed
klightspeed / ImportEDSMLogs.gs
Last active August 6, 2016 23:52
Custom Google Sheets function for importing travel logs from EDSM
// Imports travel logs from EDSM
// Usage: =ImportEDSMLogs("Commander Name","8c9e522d3bb0756a41d51146a6ae421d98a60742")
// cmdrname: Commander Name on EDSM
// apikey: API Key from https://www.edsm.net/settings/api
function ImportEDSMLogs(cmdrname,apikey) {
var url = "https://www.edsm.net/api-logs-v1/get-logs?commanderName=" + encodeURIComponent(cmdrname) + "&apiKey=" + apikey;
var data = JSON.parse(UrlFetchApp.fetch(url));
var ret = [];
if (data.msgnum == 100) {
data.logs.forEach(function(v,i,a) {
@klightspeed
klightspeed / math.tex
Last active November 19, 2017 21:49
Math for determining second body mass in binary pair given first body parameters
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
\begin{align*}
\text{==== Centre of mass ====} \\
m_{1} a_{1} &= m_{2} a_{2} \\
a_{1} &= \frac{m_{2} a_{2}}{m_{1}} \\
\text{==== Separation ====} \\
EDSM id:10940748 id64:35860157375361 "DM99 1" -> "DM99 1.3"
EDSM id:18178731 id64:29263087608705 "DM99 1" -> "DM99 1.2"
EDSM id:1706065 id64:35860157375353 "DM99 2" -> "DM99 2.4"
EDSM id:18178581 id64:82039914177385 "DM99 2" -> "DM99 2.3"
EDSM id:19974152 id64:9471878308737 "DM99 2" -> "DM99 2.1"
EDSM id:15763070 id64:64447728132977 "DM99 2" -> "DM99 2.2"
EDSM id:18471502 id64:16068948075401 "DM99 3" -> "DM99 3.2"
EDSM id:1706055 id64:2875076977529 "DM99 3" -> "DM99 3.1"
EDSM id:1706591 id64:38059180630913 "DM99 4" -> "DM99 4.3"
EDSM id:20092237 id64:16069216510833 "DM99 4" -> "DM99 4.1"
@klightspeed
klightspeed / PGRegion.cs
Last active July 10, 2018 22:24
Elite Dangerous procgen system parsing
using System;
using System.Collections.Generic;
[System.Diagnostics.DebuggerDisplay("{Name}: ({X0},{Y0},{Z0})")]
public class PGRegion
{
public string Name { get; set; }
public float X0 { get; set; }
public float Y0 { get; set; }
public float Z0 { get; set; }
public class RevenuesRequestInfo
{
[JsonProperty("this")]
public string This { get; set; }
[JsonProperty("type")]
public string Type { get; set; }
[JsonProperty("user")]
public string User { get; set; }
#!/usr/bin/python3
import sys
import json
mindist = 2500
binmoonparents = set()
gasgiants = {}
sysid64 = None
#!/usr/bin/python3
import sys
import json
import edtslib.system
maxsqdist = 4000 ** 2
def openfile(filename, filetype = None):
if filetype is None:
<!DOCTYPE html >
<html>
<body>
<svg width="1986" height="1438" viewBox="1729 2472 1986 1438">
<style>
rect#gfx_tar { fill: black; }
rect#gfx_clay { fill: gray; }
rect#gfx_tower { fill: green; }
rect#gfx_waymarker { fill: blue; }
rect.gfx_settlementmarker { fill: yellow; stroke: black; stroke-width: 1px; }