| #!/usr/bin/env php | |
| <?php | |
| // API Credentials | |
| // You can either provide them as environment variables | |
| // or hard-code them in the empty strings below. | |
| $apiUrl = getenv('BS_URL') ?: ''; // http://bookstack.local/ | |
| $clientId = getenv('BS_TOKEN_ID') ?: ''; | |
| $clientSecret = getenv('BS_TOKEN_SECRET') ?: ''; | 
| #include <PxMatrix.h> | |
| #ifdef ESP32 | |
| #define P_LAT 22 | |
| #define P_A 19 | |
| #define P_B 23 | |
| #define P_C 18 | |
| #define P_D 5 | 
| views: | |
| - icon: 'mdi:home-variant' | |
| cards: | |
| - card: | |
| show_header_toggle: false | |
| type: entities | |
| entities: | |
| - group_config: | |
| secondary_info: last-changed | |
| type: 'custom:fold-entity-row' | 
| #!/bin/bash | |
| if [[ -z "$1" ]] || [[ -z "$2" ]]; then | |
| echo "usage: kubekurwa [context] [command] [...arguments]" | |
| exit 1 | |
| fi | |
| CONTEXT=kube-$1 | |
| COMMAND=$2 | 
| [profile] | |
| layer_height = 0.15 | |
| wall_thickness = 1.2 | |
| retraction_enable = True | |
| solid_layer_thickness = 1.2 | |
| fill_density = 15 | |
| print_speed = 50 | |
| print_temperature = 200 | |
| print_temperature2 = 0 | |
| print_temperature3 = 0 | 
| import {readFile, writeFile, mkdir} from 'mz/fs' | |
| import readline from 'mz/readline' | |
| import promisify from 'es6-promisify' | |
| import google from 'googleapis' | |
| import googleAuth from 'google-auth-library' | |
| import clientSecret from './client_secret.json' | |
| // If modifying these scopes, delete your previously saved credentials | |
| // at ~/.credentials/sheets.googleapis.com-nodejs-quickstart.json | |
| const SCOPES = ['https://www.googleapis.com/auth/spreadsheets.readonly'] | 
| console.log(1); | |
| (_ => console.log(2))(); | |
| eval('console.log(3);'); | |
| console.log.call(null, 4); | |
| console.log.apply(null, [5]); | |
| new Function('console.log(6)')(); | |
| Reflect.apply(console.log, null, [7]) | |
| Reflect.construct(function(){console.log(8)}, []); | |
| Function.prototype.apply.call(console.log, null, [9]); | |
| Function.prototype.call.call(console.log, null, 10); | 
https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff
While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.
JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it mu
| { | |
| "16x9": "data:image/gif;base64,R0lGODlhEAAJAIAAAP///////yH5BAEKAAEALAAAAAAQAAkAAAIKjI+py+0Po5yUFQA7", | |
| "1x1": "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" | |
| } |