Skip to content

Instantly share code, notes, and snippets.

View Calvin-LL's full-sized avatar

Calvin Liang Calvin-LL

View GitHub Profile
@Calvin-LL
Calvin-LL / .csscomb-concentric-css.json
Created January 18, 2020 21:36
Concentric-CSS sort order for csscomb with empty lines
{
"sort-order": [
[
"all"
],
[
"box-sizing"
],
[
"display",
@Calvin-LL
Calvin-LL / comment-binding.rkt
Last active October 21, 2021 01:26
DrRacket Comment Keybinding
#lang s-exp framework/keybinding-lang
;; definitions:
;; commented line: a line where the first non-blank character is ";"
;; non-commented line: any line that isn't a commented line
;;
;; selected line: all partially or fully selected lines
;; blank line an empty line or a line with only spaces
;;
;; behavior:
@Calvin-LL
Calvin-LL / formatter-binding.rkt
Last active October 21, 2021 02:49
DrRacket Code Formatting Keybinding
#lang s-exp framework/keybinding-lang
(require fmt)
(define (format editor event)
(define text (send editor get-text))
;; for more options, see https://docs.racket-lang.org/fmt/
(define formatted-text (program-format text #:max-blank-lines +inf.0))
(send editor insert formatted-text 0 (string-length text) #f))
@Calvin-LL
Calvin-LL / Nav.kt
Last active April 9, 2024 05:08
Jetpack Compose NavHost transitions based on the default built-in Android native activity transitions
NavHost(
// ...
enterTransition = { ActivityOpenEnter },
exitTransition = { ActivityOpenExit },
popEnterTransition = { ActivityCloseEnter },
popExitTransition = { ActivityCloseExit },
) {
// ...
}