Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# usage ./js?.sh <word>
WORD=$1
STATUS_CODE=$(curl -s -o /dev/null -I -w "%{http_code}" "https://www.npmjs.com/package/$WORD")
if [ "$STATUS_CODE" == 200 ]
then

Mission

I want to live autonomously, having more time and money to invest in myself and what I care about while having good time with friends and family.

Vision

Project Coinfare a platform for algorithmic/quantitative trading that is financially stable and evolvable by providing productive research facility in order to learn and improve the system and react to structural changes in the market.

OKRs

ผมพยายามทำความเข้าใจ และวิเคราะห์ point พี่ดีน พอพูด categorical term แล้วมันอดไม่ได้ เพราะมันมักจะมีอะไรน่าสนใจซ่อนอยู่เสมอ เมื่อเรามองอะไรผ่าน lense ของ category theory

ก่อนจะไปต่อ ผมอยากเซตพื้นให้พูดคำเดียวกัน มีความหมายเดียวกันก่อน เพราะผมว่าผมไม่แน่ในว่าที่คุยกัน เราเข้าใจแต่ละคำเหมือนกันมั้ยนะ

category ประกอบไปด้วย

  1. object (eg. type)
  2. morphism (eg. function)
  3. identity morphism (eg. identity function)
def count_one_bit(n)
n.to_s(2).count "1"
end
const censor = text => {
const iter = document
.evaluate(`//*[contains(text(),'${text}')]`, document, null, XPathResult.ANY_TYPE, null)
let el = iter.iterateNext()
while(el) {
el.style = "color: transparent; text-shadow: 0 0 5px rgba(0,0,0,0.5);"
try { el = iter.iterateNext() } catch (_) { break }
}
resource "aws_api_gateway_rest_api" "manudped" {
name = "manudped"
description = "manudped rss transformation"
endpoint_configuration {
types = ["REGIONAL"]
}
}
resource "aws_api_gateway_resource" "rss" {
const id = exp => exp
const promo = exp => exp * 2
const trueCash = exp => exp * 10
const makeTotalExp = upgraders => monsters => monsters
.reduce((totalExp, monster) => {
const upgradedExp = upgraders
.reduce((upgradedExp, upgrade) => upgrade(upgradedExp), monster.exp)
return totalExp + upgradedExp
type Game = {
name: string
rating: number
}
const gameList: Game[] = [
{ name: 'call of duty', rating: 4.0 },
{ name: 'assasin creed', rating: 6.4 },
{ name: 'mario', rating: 10.2 },
]
#!/bin/bash
set -e
SCRIPT_DIR=$(cd $(dirname $0) ; pwd -P)
TASK=$1
ARGS=${@:2}
data class ContextA(val valueA: String, val valueB: Int)
data class ContextB(val valueB: Int, val valueC: Int, val valueD: Double)
val theReader: Reader<Int, String> =
Reader().lift { b: Int -> "The number is $b!!!" }
val theReaderInA: Reader<ContextA, String> = theReader
.local(ContextA::valueB::get)