Skip to content

Instantly share code, notes, and snippets.

View tsuckow's full-sized avatar

Thomas Suckow tsuckow

View GitHub Profile
@tsuckow
tsuckow / ComPort.cs
Created September 9, 2016 05:24
ComPort workaround
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO.Ports;
using System.IO;
namespace IPS.COM
{
public class ComPort : IDisposable
@tsuckow
tsuckow / index.html
Last active February 18, 2016 07:42
Computes the time at confluent from a Google Location History Export
<a href="https://takeout.google.com/settings/takeout/custom/location_history">Get your location data from here</a>, don't forget to extract the .json file.
<br><br>
Lat: <input type="number" id="lat" value="46.2854826"> Lon: <input type="number" id="lon" value="-119.2767022">
<br><br>
<script>
var lat = 46.2854826;
var lon = -119.2767022;
function distance(lat1, lon1, lat2, lon2, unit) {
@tsuckow
tsuckow / designer.html
Created January 8, 2015 02:37
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@tsuckow
tsuckow / privileged.htm
Last active December 19, 2015 13:39
Script to try to break out of a JS sandbox
<script>
console.log(Math.sin(1));
setTimeout(function(){
console.log(Math.sin(1))
},2000);
</script>
Loaded <a href="https://gist.github.com/tsuckow/5963803">Gist</a>