{{title|replace(',','_')|replace(':','_')|replace('/','_')|replace('\n','_')}}
{% raw %}
> [!IMPORTANT] Next highlight
#!/bin/bash | |
# Colors | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NO_COLOR='\033[0m' | |
BLUE='\033[0;34m' | |
YELLOW='\033[0;33m' | |
NO_COLOR='\033[0m' |
//> using scala 3.3 | |
import scala.util.{Failure, NotGiven, Success, Try, boundary} | |
import boundary.{Label, break} | |
import scala.annotation.targetName | |
/** | |
* Proof of concept implementation of a syntax similar to Kotlin and | |
* typescript. Within the context provided by [[getEither]], you can call | |
* `?` on any optional/failable type (currently supports [[Option]], |
substitutions: | |
device_name: 'Digoo Station' | |
external_location: 'Balcony' | |
rf_receiver_pin: '4' | |
digoo_sensor_channel: '2' | |
digoo_sensor_id: '9' | |
esphome: | |
name: digoo-station | |
comment: 'ESP station for environment monitoring' |
#!/system/bin/sh | |
# Split APKs Installer | SAI # | |
: ' | |
This script allows you to install splits-apk with one adb shell command! push this script to your device with adb and run it: | |
usage: sh sai.sh [path/to/folder/with/the/apks] [installer pkg (optional)] [originating-uri (optional)] | |
example: sh sp_installer.sh "/data/local/tmp/wa_app/" "com.android.vending" "171faa8c8918" | |
Author: David Lev (github.com/david-lev) | |
' | |
echo "<<< Split APKs Installer | github.com/david-lev >>>\n" |
const MY_DOMAIN = "help.splitbee.io" | |
const START_PAGE = "https://www.notion.so/splitbee/Help-Center-bbf26e2b70574901b9c98e5d11e449de" | |
addEventListener('fetch', event => { | |
event.respondWith(fetchAndApply(event.request)) | |
}) | |
const corsHeaders = { | |
"Access-Control-Allow-Origin": "*", | |
"Access-Control-Allow-Methods": "GET, HEAD, POST,PUT, OPTIONS", |
Spoilers for Advent of Code 2019 follow.
Fuel required to launch a given module is based on its mass. Specifically, to find the fuel required for a module, take its mass, divide by three, round down, and subtract 2.
This describes a simple function. There seems to be an oversight in the problem statement that modules with very low mass have a negative fuel requirement. I'm going to assume that's not right, and that instead of integer subtraction, we want natural number subtraction (sometimes called "monus"). In Unison, we can use the Nat
type instead of integers, so we don't have to consider negatives. The subtraction operation is called drop
:
const MY_DOMAIN = "agodrich.com" | |
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2" | |
const DISQUS_SHORTNAME = "agodrich" | |
addEventListener('fetch', event => { | |
event.respondWith(fetchAndApply(event.request)) | |
}) | |
const corsHeaders = { | |
"Access-Control-Allow-Origin": "*", |
Dear Community
We from the Scala team at Lightbend have decided to take some time this summer to work on usability improvements that are always falling through the cracks while we're busy working on the hard features of the next Scala release. Here is a summary of our project proposals.
@som-snytt already implemented the JLine 3 upgrade (scala/scala#8036) which gives multi-line history and editing. We are planning to add further improvements (many of them pioneered by Ammonite and/or the Dotty REPL) on top of this, for example syntax highlighting and import library dependencies.
/* library dependecies | |
"org.xerial" % "sqlite-jdbc" % "3.23.1", | |
"org.tpolecat" %% "doobie-core" % "0.5.3", | |
"org.tpolecat" %% "doobie-hikari" % "0.5.3", // HikariCP transactor. | |
"org.tpolecat" %% "doobie-specs2" % "0.5.3", // Specs2 support for typechecking statements. | |
"org.tpolecat" %% "doobie-scalatest" % "0.5.3", // ScalaTest support for typechecking statements. | |
*/ | |
object TryDoobie extends App { | |
import doobie._ |