Skip to content

Instantly share code, notes, and snippets.

@len0rd
len0rd / bck.20180913182153.navigator.settings.json
Last active November 12, 2019 21:58
Visual Studio Code Settings Sync Gist
{
"workbench.statusBar.feedback.visible": false,
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "Material Theme Palenight",
"materialTheme.fixIconsRunning": false,
"extensions.ignoreRecommendations": false,
"todohighlight.isEnable": false,
"explorer.confirmDelete": false,
"python.pythonPath": "/usr/bin/python",
"cmake.configureOnOpen": true
import groovy.grape.Grape
@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.2')
import groovyx.net.http.RESTClient
import static groovyx.net.http.ContentType.JSON
import groovy.json.JsonSlurper
def urlToSendTo = 'https://hooks.slack.com/services/token/tokenAgain/evenMoreToken'
def message = """{
@len0rd
len0rd / splitUSStateCountyKMLCensusFiles.groovy
Last active July 12, 2022 17:29
Pretty county KML data from the US census and split it into separate files for each state
import groovy.xml.*
/**
* Removes some additional MetaData I dont want and splits the
* US county KML file into seperate files for each state
* Get the census data from:
* https://www.census.gov/geo/maps-data/data/kml/kml_counties.html
* The higher the ratio, the lower the resolution
*
* This data can be easily imported into a Google MyMap
*
@len0rd
len0rd / install.sh
Last active September 26, 2017 13:58 — forked from mickaelandrieu/install.sh
Install phantomjs/casperjs on GNU/Linux
#!/bin/bash
# `` sudo sh install.sh ``
# Developement environnement
#
# For stable environnement see also : https://gist.github.com/mickaelandrieu/6312724
echo Install Phantomjs
cd /usr/local/share
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
sudo tar -xvf phantomjs-2.1.1-linux-x86_64.tar.bz2
@len0rd
len0rd / alt_calc.m
Last active July 25, 2017 18:29
Calculate altitude meters from pressure pascals (Pa->m)
%fast altitude calculation based on:
%https://en.wikipedia.org/wiki/Pressure_altitude
%(1-(millibars/1013.25)^(0.190284))*145366.45 = feet
%Bounds setup:
paMin = 69683;
paMax = 106597;
stepCount = 500; %number of values to plot
%setup pa vector
@len0rd
len0rd / baro_lookup.py
Created July 25, 2017 17:22 — forked from superjax/lookup_table_generator.py
Barometer Lookup Table python generator file
import numpy as np
import os
import matplotlib.pyplot as plt
def f(pressure):
return ((1.0 - pow(pressure/101325.0, 0.190284)) * 145366.45) * 0.3048
def finv(alt):
return 101325.0*(1-2.25577*10**-5 * alt) ** 5.25588