Skip to content

Instantly share code, notes, and snippets.

View jywarren's full-sized avatar

Jeffrey Warren jywarren

View GitHub Profile
function myWindroseMarker(t){var e='<canvas id="id_'+t.id+'" width="50" height="50"></canvas>',i=L.divIcon({html:e,iconSize:[50,50],className:"owm-div-windrose"});return L.marker([t.coord.Lat,t.coord.Lon],{icon:i,clickable:!1})}function myWindroseDrawCanvas(t,e){var i=document.getElementById("id_"+t.id);i.title=t.name;var n=0,o=0,r=0;if("undefined"!=typeof t.wind&&("undefined"!=typeof t.wind.speed&&(i.title+=", "+t.wind.speed+" m/s",i.title+=", "+e._windMsToBft(t.wind.speed)+" BFT",o=t.wind.speed),"undefined"!=typeof t.wind.deg&&(i.title+=", "+e._directions[(t.wind.deg/22.5).toFixed(0)],n=t.wind.deg),"undefined"!=typeof t.wind.gust&&(r=t.wind.gust)),i.getContext&&o>0){var s=0,a=0;o<=10?(a=10*o+155,s=255*o/10):(s=255,a=255-255*(Math.min(o,21)-10)/11);var l=i.getContext("2d");l.translate(25,25),l.rotate(n*Math.PI/180),l.fillStyle="rgb("+Math.floor(s)+","+Math.floor(a)+",0)",l.beginPath(),l.moveTo(-15,-25),l.lineTo(0,-10),l.lineTo(15,-25),l.lineTo(0,25),l.fill(),r>0&&r!=o&&(r<=10?(a=10*r+155,s=255*r/10):(s=255,a
This file has been truncated, but you can view the full file.
{"files":{"uploads-9efac35e37cde2752c4dff9a4c7d44ca3184066bd5e193e0b0d2c168ca889a6d.js":{"logical_path":"uploads.js","mtime":"2019-08-09T02:19:29-04:00","size":1509,"digest":"9efac35e37cde2752c4dff9a4c7d44ca3184066bd5e193e0b0d2c168ca889a6d","integrity":"sha256-nvrDXjfN4nUsTf+aTH1EyjGEBmvV4ZPgsNLBaMqImm0="},"knitter-bc21d367f01c3244253c102a157187b748771f0e6e5e0a14d037e5c492032c8e.js":{"logical_path":"knitter.js","mtime":"2019-06-28T22:46:25+06:00","size":15080,"digest":"bc21d367f01c3244253c102a157187b748771f0e6e5e0a14d037e5c492032c8e","integrity":"sha256-vCHTZ/AcMkQlPBAqFXGHt0h3Hw5uXgoU0DflxJIDLI4="},"annotations-a7e40898f9a25173d9105cad7e6ffe39106bd9eba77acae6e6b6e7cb6e536724.js":{"logical_path":"annotations.js","mtime":"2019-08-09T12:19:29+06:00","size":116059,"digest":"a7e40898f9a25173d9105cad7e6ffe39106bd9eba77acae6e6b6e7cb6e536724","integrity":"sha256-p+QImPmiUXPZEFytfm/+ORBr2eunesrm5rbny25TZyQ="},"maps-1074c7752b6f83901b719904a3e66d488799b51da2c4456880ea3c55f1e7510e.js":{"logical_path":"maps.js","mtime":
This file has been truncated, but you can view the full file.
/* @preserve
* Leaflet 1.5.1, a JS library for interactive maps. http://leafletjs.com
* (c) 2010-2018 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.L = {})));
@jywarren
jywarren / hippocratic-license-adaptation.txt
Last active January 22, 2020 20:45
Hippocratic License adaptations - working doc - https://firstdonoharm.dev/
Copyright (YEAR) (COPYRIGHT HOLDER)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
* No Harm: The software may not be used by anyone for systems or activities that actively and knowingly endanger, harm, or otherwise threaten the physical, mental, economic, or general well-being of other individuals or groups, in violation of the United Nations Universal Declaration of Human Rights (https://www.un.org/en/universal-declaration-human-rights/).
* Services: If the Software is used to provide a service to
@jywarren
jywarren / plantowerPulse.ino
Last active March 23, 2020 17:12
plantowerPulse.ino
/*
Pulse a light on briefly, but speed up pulses as PM2.5 values go up.
https://learn.adafruit.com/pm25-air-quality-sensor/arduino-code
*/
int led = 10; // the PWM pin the LED is attached to
int brightness = 0; // how bright the LED is
int fadeAmount = 5; // how many points to fade the LED by
/home/builder/opt/arduino-builder/arduino-builder -compile -core-api-version 10611 -hardware /home/builder/opt/arduino-builder/hardware -hardware /home/builder/.arduino15/packages -tools /home/builder/opt/arduino-builder/tools -tools /home/builder/.arduino15/packages -built-in-libraries /home/builder/opt/libraries/latest -logger humantags -fqbn arduino:avr:micro -build-cache /tmp -build-path /tmp/091402050/build -verbose -prefs runtime.tools.avr-gcc.path=/home/builder/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5 -prefs runtime.tools.avrdude.path=/home/builder/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs runtime.tools.nrf5x-cl-tools.path=/home/builder/.arduino15/packages/arduino/tools/nrf5x-cl-tools/9.3.1 -prefs runtime.tools.linuxuploader.path=/home/builder/.arduino15/packages/arduino/tools/linuxuploader/1.5.1 -prefs runtime.tools.i586-poky-linux-uclibc.path=/home/builder/.arduino15/packages/Intel/tools/i586-poky-linux-uclibc/1.6.2+1.0 -prefs runtime.tools.mkspiffs.p
Delivered-To: jywarren@gmail.com
Received: by 2002:adf:8bce:0:0:0:0:0 with SMTP id w14csp147635wra;
Tue, 7 Jan 2020 16:00:39 -0800 (PST)
X-Received: by 2002:a05:6830:1586:: with SMTP id i6mr530357otr.221.1578441639118;
Tue, 07 Jan 2020 16:00:39 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1578441639; cv=pass;
d=google.com; s=arc-20160816;
b=fcAXYIWuynS9/zxv84sXjV6JRSBQ7tFkA2GNzDLWTB3ONhYgO2cF4+aObsxX69SJYW
Sf09dHDpeXUaQ5SA0qpz+29halioXv/0515X4qIqepsKtAskYXE9nM1UBZUi4Ku3Zuy/
f7WPqyN4X5wjwIhLIyN2xog2q6f+HM6p85rDxU+/NSS73mR5I2k7HQsWJZzko+78WnZG
<font size=\"+1\">Stevie,<br>\r
Thanks for asking this of others.<br>\r
X<br>\r
</font>
On 12/16/2019 8:59 AM,\r [notifications@publiclab.org](mailto:notifications@publiclab.org) wrote:
> <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">
>
> **[Are there simple tests for nitrates\r in well water?](https://publiclab.org/n/21769)**
/**/_xdc_._71h5tp && _xdc_._71h5tp( {
"html_attributions" : [],
"result" : {
"address_components" : [
{
"long_name" : "Somerville",
"short_name" : "Somerville",
"types" : [ "locality", "political" ]
},
{
# Configuration for probot-stale - https://github.com/probot/stale
# General Configuration
# Label to use when marking as stale
staleLabel: stale
# Pull Request specific configuration
pulls:
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 30