Skip to content

Instantly share code, notes, and snippets.

View humorless's full-sized avatar

Laurence Chen humorless

View GitHub Profile
;; Logging is a bit of a lost art. I see people use it the same way they use
;; println debugging, putting in lots of (log/debug "HERE") kind of stuff, and
;; then removing it afterwards.
;;
;; But with a good logging library these logging statements can continue to
;; provide value, even if (especially if) most of the time you turn them off.
;; For this you need to make good use of log levels like
;; error/warn/info/debug/trace. What follows is an illustrated example of how I
;; tend to use them.
@humorless
humorless / dbt-duckdb-tutorial.md
Last active August 25, 2023 12:24
Modern data stack by REPLWARE

Modern data stack

Main features

REPLWARE 建議的資料分析技術棧 (modern data stack) 主要有下列特色:

  • ELT over ETL
  • SQL based analytics over non-SQL based analytics
  • Analytic Engineer as a new position
  • When the data is not exceeding 1T, your desktop/notebook is fast enough.
@humorless
humorless / Clojure-tutorial.md
Last active November 5, 2022 09:42
Clojure 速成

為什麼要用 Clojure 語言來開發軟體?

在 Clojure 社群的一個說法:「同樣的工程師使用 Java 來開發軟體、使用 Nodejs 來開發軟體、使用 Clojure 來開發同樣軟體所花費的時間,大約是:5:3:1。」

Part 1: Basic

lesson 1: syntax

  1. truth, math, string
  2. Intros to list, vector, map, set
  3. conj: conj list ,conj vector ,conj map ,conj set
@humorless
humorless / emacs.md
Last active October 14, 2021 06:35
project quality control

invoke function

SPC SPC = M-x
- load-theme
- add-project
- global-linum-mode

special commands

@humorless
humorless / core.clj
Created September 15, 2021 03:19 — forked from plexus/core.clj
(ns my-backend.core
(:gen-class)
(:require [compojure.core :as c]
[compojure.route :as route]
[ring.adapter.jetty :as jetty]
[ring.middleware.defaults :as ring-defaults]
[hiccup2.core :as h]
#_[muuntaja.core :as m]
[muuntaja.middleware :as muuntaja]))
(ns my-backend.core
(:gen-class)
(:require [compojure.core :as c]
[compojure.route :as route]
[ring.adapter.jetty :as jetty]
[ring.middleware.defaults :as ring-defaults]
[hiccup2.core :as h]
#_[muuntaja.core :as m]
[muuntaja.middleware :as muuntaja]))
@humorless
humorless / gh-pages.md
Created May 27, 2020 07:23
How to create github project pages
  1. Create gh-pages branch
git checkout --orphan gh-pages
git rm -rf .    # 砍掉所有檔案重來
...  # 加新檔案
git add .
git commit -m 'create new branch'

Push this branch to github repo

@humorless
humorless / API.md
Last active May 19, 2020 07:27
sales pipeline system design draft

Command API

  1. approve-request
  2. reject-request
{
  "c": "reject-request",
  "req-op": {
    "id": 17592186045481,
    "stamp": 0
@theronic
theronic / deps.clj
Created February 28, 2018 08:00
Convert Clojure project.clj :dependencies to deps.edn style
; using Clojure 1.9
(require '[clojure.pprint :as pprint])
(defn xform-dep [[lib version & korks]]
(let [args (into {} (apply hash-map korks))]
[lib (merge {:mvn/version version} args)]))
(defn xform-deps
"deps.edn utility function by @theronic 2018-02-28
Transforms a collection of project.clj :dependencies to deps.edn style