This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Can be run without npm installation on https://npm.runkit.com/qrcode | |
const qrcode = require('qrcode'); | |
qrcode.toDataURL('WIFI:S:<SSID>;T:<WPA|WEP|>;P:<password>;;', {width: 500}, (err, url) => { | |
console.table(url); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @fileoverview Utility to delete old threads from a search. | |
* This is an Apps Script code. | |
* | |
* Example of usage: | |
* Go to scripts.google.com and click 'New script'. | |
* Enable V8, as the code is written with ES6 features. | |
* Change QUERY_SEARCH values to the gMail search filters | |
* that matches the emails you want to delete. | |
* For example: 'label:coding older_than:1m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fetches utility consumption details from the Utilities email and sends it to Hassio MQTT. | |
* | |
* Apps Script on drive.google.com | |
*/ | |
/* Configuration. */ | |
/** @const {string} URL for MQTT Server API. */ | |
var MQTT_URL = 'https://your-ha-domain:port/api/services/mqtt/publish'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Creates an Asana Tasks sensors.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @fileoverview Utility to delete old threads from a search. | |
* This is an Apps Script code. | |
* | |
* Example of usage: | |
* Go to scripts.google.com and click 'New script'. | |
* Enable V8, as the code is written with ES6 features. | |
* Change QUERY_SEARCH to a gMail search/filter that matches | |
* the emails you want to delete. For example: | |
* 'label:coding older_than:1m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function selectEggs(addEgg) { | |
let blue = 23; | |
let purple = 33; | |
let red = 43; | |
if (addEgg == 'blue') blue++; | |
else if (addEgg == 'purple') purple++; | |
else if (addEgg == 'red') red++; | |
else { | |
console.log('Must select a colour: blue, purple, red'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Oura sleep integration.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import flask | |
import reader | |
app = flask.Flask(__name__) | |
enviro_reader = reader.EnviroReader() | |
@app.route("/api/all") | |
def get_all_readings(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Runs a Hangman game that can be played via terminal. | |
Prerequisites: | |
1. Download the code as hangman.py into any folder. | |
2. Get a .txt file called 'words.txt' with all the words that you want to include in the game. | |
>> Example: https://github.com/dwyl/english-words | |
To play: | |
- Run `python hangman` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @fileoverview Resizes all images in a document to a desired width | |
* while limited to a max size. Sizes are in cm. | |
* | |
* This code is meant to be implemented as a script on a Google Docs | |
* document: Tools > Script editor. | |
* | |
* Once open, paste the code, adjust your desired sizes and run: | |
* `resizeToDesiredWidth`. | |
* |