Skip to content

Instantly share code, notes, and snippets.

View mattsson's full-sized avatar

Marcus Mattsson mattsson

View GitHub Profile
Testing Solar deep-linking
<html>
<body>
<p><a href="mitid-app://">mitid-app://</a></p>
</body>
</html>
// Change the following constants to your country of choice
const population = 5837213;
const herdImmunityPercentage = 70;
// Go to https://github.com/owid/covid-19-data/tree/master/public/data/vaccinations/country_data and find the raw URL for your country
const dataUrl = "https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/vaccinations/country_data/Denmark.csv";
// -------------------------
// With caching and fallback
const cacheMinutes = 60; // 60 min
@mattsson
mattsson / Vaccination Status.js
Last active January 13, 2021 12:43
Vaccination Status
// Constants you can change
const citizensInDenmark = 5837213
const herdImmunityPercentage = 0.65
const url = "https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/vaccinations/country_data/Denmark.csv"
// Set constants
const totalVaccinationsNeeded = citizensInDenmark * herdImmunityPercentage * 2
const widget = new ListWidget()
widget.spacing = 4
@mattsson
mattsson / Contact Number.js
Last active November 25, 2020 13:30
COVID-19 contact number for Denmark
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: blue; icon-glyph: user-md;
const apiKey = ""
const widget = new ListWidget()
widget.addSpacer()
// Fetch SSI website code
@mattsson
mattsson / README.md
Last active November 25, 2020 14:02
Tour de France Standings Scriptable Widget for iOS 14

https://imgur.com/a/q8R5iNf

To use:

  1. Update iOS 14
  2. Install Scriptable app: https://scriptable.app/
  3. Add a new script and paste in the script code
  4. Add a medium-sized widget to your iPhone home screen by long-holding, tapping the Plus button in the top left and selecting Scriptable from the list of widget sources
  5. Configure the widget to use the Tour de France Standings script by long-holding on the widget and tapping Edit Widget
^Cpi@raspberrypi:~/bleno-onindicate-bug/Node Project $ sudo hcidump -t -x
HCI sniffer - Bluetooth packet analyzer ver 5.23
device: hci0 snap_len: 1500 filter: 0xffffffff
2016-11-01 09:25:51.901378 < HCI Command: Set Event Mask (0x03|0x0001) plen 8
Mask: 0xfffffbff07f8bf3d
2016-11-01 09:25:51.901994 > HCI Event: Command Complete (0x0e) plen 4
Set Event Mask (0x03|0x0001) ncmd 1
status 0x00
2016-11-01 09:25:51.902027 < HCI Command: LE Set Event Mask (0x08|0x0001) plen 8
mask 0x1f00000000000000 (Reserved)
gatt handles = [
{},
{
"type": "service",
"uuid": "1800",
"startHandle": 1,
"endHandle": 5
},
{
"type": "characteristic",

Keybase proof

I hereby claim:

  • I am mattsson on github.
  • I am knejt (https://keybase.io/knejt) on keybase.
  • I have a public key whose fingerprint is 0E1B 4CD1 8F54 2AB0 F707 8BB5 D296 2E6D 5D9D A560

To claim this, I am signing this object: