Skip to content

Instantly share code, notes, and snippets.

@RussNelson
RussNelson / twoletters.scad
Created November 5, 2023 02:39
not manifold
linear_extrude(1) polygon(
points=
[[-137.867, 155.712], [-137.867, 156.302], [-137.853, 156.466], [-137.723, 156.602], [-137.658, 156.613], [-137.037, 156.613], [-136.816, 156.559], [-136.483, 156.076], [-136.559, 155.797], [-136.65, 155.661], [-136.678, 155.441], [-136.607, 155.257], [-136.528, 155.042], [-136.52, 154.977], [-136.616, 154.859], [-136.839, 154.958], [-136.898, 155.073], [-137.017, 155.345], [-137.09, 155.452], [-137.141, 155.492], [-137.429, 155.497], [-137.514, 155.404], [-137.531, 155.274], [-137.545, 155.014], [-137.633, 154.884], [-137.845, 154.969], [-137.864, 155.099], [-137.864, 155.72], [-137.266, 155.862], [-136.955, 155.904], [-136.842, 156.054], [-136.924, 156.22], [-137.076, 156.274], [-137.336, 156.274], [-137.398, 156.26], [-137.52, 156.121], [-137.458, 155.915], [-137.401, 155.887], [-137.266, 155.862]],
paths=
[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 2
@RussNelson
RussNelson / make-osm.py
Created July 2, 2018 21:27
convert a sample of the Microsoft buildings data into a .osm file
#!/usr/bin/python
inl = '''{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-79.017141657351175,43.19780192629009],[-79.017342809996279,43.197800746032968],[-79.0173418817583,43.197716672803352],[-79.017253374594461,43.19771719211721],[-79.017252424769524,43.19763116357705],[-79.017139779288271,43.19763182452288],[-79.017141657351175,43.19780192629009]]]}},
'''
osm_xml = """<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' generator='JOSM'>
<node id='-100425' action='modify' lat='41.57544047908' lon='-75.42956033631' />
<node id='-100426' action='modify' lat='41.57540557904' lon='-75.42937613631' />
mapapp-adc4edff.js:3 _ _ _ _ _
mapapp-adc4edff.js:5 ' ) ) ) // //
mapapp-adc4edff.js:7 / / / __. _ o // // __. __ __ ,
mapapp-adc4edff.js:9 / ' (_(_/|_/_)_<_</_</_(_/|_/ (_/ (_/_
mapapp-adc4edff.js:11 / /
mapapp-adc4edff.js:13 ' '
mapapp-adc4edff.js:15 You are quite a hacker (1337)
mapapp-adc4edff.js:17 File bugs at https://github.com/mapillary/mapillary_issues
mapapp-adc4edff.js:19 or get a job at http://www.mapillary.com/jobs
mixpanel-2-latest.min.js:47 GET https://api.mixpanel.com/track/?data=eyJldmVudCI6ICJtcF9wYWdlX3ZpZXciLCJwcm…kYzdkMDlmMDgxMjU2NzVmM2U0NGRkZjEyZmYxZTYzZSJ9fQ%3D%3D&ip=1&_=1441031671426 net::ERR_INSECURE_RESPONSEh.q @ mixpanel-2-latest.min.js:47h.T @ mixpanel-2-latest.min.js:49h.Pb @ mixpanel-2-latest.min.js:49h.oa @ mixpanel-2-latest.min.js:44(anonymous function) @ mixpanel-2-latest.min.js:100c.c @ mixpanel-2-latest.min.js:7(anonymous function) @ mixpanel-2-l
@RussNelson
RussNelson / gist:7856deea8e8fe2fede5f
Created January 4, 2015 03:06
ble-bean strace read/writes
read(15, "bind success\n", 65536) = 13
read(15, "connect success\n", 65536) = 16
write(11, "020001\n", 7) = 7
read(3, "*", 1) = 1
write(4, "*", 1) = 1
read(15, "data 031700\n", 65536) = 12
write(11, "100100ffff0028\n", 15) = 15
read(15, "data 11140100090000000000000000b"..., 65536) = 50
write(11, "100a00ffff0028\n", 15) = 15
read(15, "data 11060a001400001815001800011"..., 65536) = 46
// define the prototype that will be instantiated when the bulb is discovered
// later, we will create a ...perform function, and a ...update function.
var LIFX = exports.Device = function(deviceID, deviceUID, info) {
console.log("create new bulb");
var self = this;
logger.info("create new bulb",deviceID, deviceUID, info);
self.whatami = info.deviceType;
self.deviceID = deviceID.toString();
self.deviceUID = deviceUID;