Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Peddell klightspeed

View GitHub Profile
View wurm-paths-southeast-cadence.html
<!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; }
@klightspeed
klightspeed / .EliteDangerousCompanionAPI.md
Last active Nov 2, 2021
Simple C# Elite Dangerous Companion API client
View .EliteDangerousCompanionAPI.md

Simple CAPI client to retrieve player profile from the Elite Dangerous Companion API using OAuth2

View find8moongg.py
#!/usr/bin/python3
import sys
import json
import edtslib.system
maxsqdist = 4000 ** 2
def openfile(filename, filetype = None):
if filetype is None:
View findbinmoongg.py
#!/usr/bin/python3
import sys
import json
mindist = 2500
binmoonparents = set()
gasgiants = {}
sysid64 = None
View SmashCastRevenues.cs
public class RevenuesRequestInfo
{
[JsonProperty("this")]
public string This { get; set; }
[JsonProperty("type")]
public string Type { get; set; }
[JsonProperty("user")]
public string User { get; set; }
@klightspeed
klightspeed / PGRegion.cs
Last active Jul 10, 2018
Elite Dangerous procgen system parsing
View PGRegion.cs
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; }
View DM99 renames
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 / math.tex
Last active Nov 19, 2017
Math for determining second body mass in binary pair given first body parameters
View math.tex
\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 ====} \\
@klightspeed
klightspeed / ImportEDSMLogs.gs
Last active Aug 6, 2016
Custom Google Sheets function for importing travel logs from EDSM
View ImportEDSMLogs.gs
// 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) {
View gist:1a234599d699167255bb
# 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