Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat
Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.
/** | |
* copyright 2020 P. Oscar Boykin <[email protected]> | |
* licensed under Apache V2 license: https://www.apache.org/licenses/LICENSE-2.0.html | |
* or, at your option, GPLv2 or later: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html | |
*/ | |
package testrunner | |
import io.github.classgraph._ | |
import java.io.PrintWriter |
#!/usr/bin/env python | |
# | |
# by Erik Osheim | |
# | |
# STEPS TO USE | |
# | |
# 0. install deps | |
# - pip install requests | |
# | |
# 1. generate personal access token |
Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat
Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.
Tageless Final interpreters are an alternative to the traditional Algebraic Data Type (and generalized ADT) based implementation of the interpreter pattern. This document presents the Tageless Final approach with Scala, and shows how Dotty with it's recently added implicits functions makes the approach even more appealing. All examples are direct translations of their Haskell version presented in the Typed Tagless Final Interpreters: Lecture Notes (section 2).
The interpreter pattern has recently received a lot of attention in the Scala community. A lot of efforts have been invested in trying to address the biggest shortcomings of ADT/GADT based solutions: extensibility. One can first look at cats' Inject
typeclass for an implementation of [Data Type à la Carte](http://www.cs.ru.nl/~W.Swierstra/Publications/DataTypesA
This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.
First be sure to enable the Docker Remote API on the remote host.
This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.
require 'rexml/document' | |
require 'rexml/xpath' | |
require 'http' | |
require 'icalendar' | |
HTTP::Request::METHODS = HTTP::Request::METHODS + [:report] | |
module AppleCalDav | |
class Client | |
attr_accessor :username, :password |
import java.io.*; | |
import java.net.*; | |
import java.nio.file.*; | |
import java.util.*; | |
import java.util.stream.*; | |
import static java.util.stream.Collectors.*; | |
/** | |
* This class creates zip archives. Instead of directly using {@link java.util.zip.ZipOutputStream}, | |
* this implementation uses the jar {@link FileSystem} available since Java 1.7.<p> |
Recently, I found myself in need to precisely understand Scala's core typechecking rules. I was particulary interested in understanding rules responsible for typechecking signatures of members defined in classes (and all types derived from them). Scala Language Specification (SLS) contains definition of the rules but lacks any examples. The definition of the rules uses mutual recursion and nested switch-like constructs that make it hard to follow. I've written down examples together with explanation how specific set of rules (grouped thematically) is applied. These notes helped me gain confidence that I fully understand Scala's core typechecking algorithm.
Let's quote the Scala spec for As Seen From (ASF) rules numbered for an easier reference:
This tutorial demonstrates how to use Google Apps Script to:
Create copies of the Google Sheet in the desired destination folder automatically at set intervals.
Append the time stamp with each backup file's name.
Adjust time trigger for backing up every day/hour/minute.
ollie-scalafmt@ import scala.sys.process._ | |
import scala.sys.process._ | |
ollie-scalafmt@ import java.io.ByteArrayInputStream | |
import java.io.ByteArrayInputStream | |
ollie-scalafmt@ formatMe | |
res28: String = """ | |
Defn.Object(Nil, Term.Name("State"), Template(Nil, Seq(Ctor.Ref.Name("ScalaFmtLogger")), Term.Param(Nil, Name.Anonymous(), None, None), Some(Seq(Defn.Val(Nil, Seq(Pat.Var.Term(Term.Name("start"))), None, Term.Apply(Term.Name("State"), Seq(Lit(0), Term.Name("identity"), Term.ApplyType(Term.Select(Term.Name("Vector"), Term.Name("empty")), Seq(Type.Name("Split"))), Term.ApplyType(Term.Select(Term.Name("Vector"), Term.Name("empty")), Seq(Type.Name("State"))), Lit(0), Term.ApplyType(Term.Select(Term.Name("Vector"), Term.Name("empty")), Seq(Type.Apply(Type.Name("Indent"), Seq(Type.Name("Num"))))), Lit(0)))), Defn.Def(Nil, Term.Name("reconstructPath"), Nil, Seq(Seq(Term.Param(Nil, Term.Name("toks"), Some(Type.Apply(Type.Name("Array"), Seq(Type.Name("FormatToken")))), None), Term.Param(Nil, Term.Name("splits"), Some(T |