safe-> is a safe navigation macro for Clojure. It extends some-> with additional guards:
- doesn’t call nil values
- doesn’t call missing methods (ClojureScript only)
Idea from Timur Xazamov https://x.com/nanot1m/status/1720494020651020562
While waiting for the [JS pipe operator] |>, maybe we can use ($=…, $=…, $) instead.
| #!/bin/bash | |
| # Cheatsheet for remembering Bash rules for Parameter Substitution: | |
| # https://tldp.org/LDP/abs/html/parameter-substitution.html#PSUB2 | |
| # Fallback for unset vars | |
| # Bash #——> like JavaScript | |
| ${a+b} #——> a && b |
| (ns user | |
| (:import (java.util.concurrent Executors TimeUnit))) | |
| (defn set-timeout [^Callable f ^long ms] | |
| (doto (Executors/newScheduledThreadPool 1) | |
| (.schedule f ms TimeUnit/MILLISECONDS))) | |
| (defn set-interval [^Callable f ^long ms] | |
| (doto (Executors/newScheduledThreadPool 1) | |
| (.scheduleAtFixedRate f 0 ms TimeUnit/MILLISECONDS))) |
| import java.nio.charset.StandardCharsets; | |
| import java.security.PrivateKey; | |
| import java.security.Security; | |
| import java.security.Signature; | |
| import java.util.Base64; | |
| import org.bouncycastle.jce.provider.BouncyCastleProvider; | |
| import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; | |
| import org.bouncycastle.openssl.PEMKeyPair; | |
| import org.bouncycastle.openssl.PEMParser; |
| (ns example.polymarket.sign | |
| (:require | |
| [cheshire.core :as json] | |
| [clojure.string :as str]) | |
| (:import | |
| (org.web3j.crypto Sign Credentials) ;; org.web3j/crypto "4.12.2" | |
| (org.web3j.utils Numeric) | |
| (java.util Base64) | |
| (javax.crypto Mac) | |
| (javax.crypto.spec SecretKeySpec))) |
jon_amen | Polymarket — 12/18/24, 11:52 AM
Today, we are releasing some documentation for Polymarket Data-API:
https://polymarket.notion.site/Polymarket-Data-API-Docs-15fd316c50d58062bf8ee1b4bcf3d461Power users and developers can use this API to:
- List their positions
- Track top holders of a market
This is a markdown-formatted mirror of the plaintext style guide here: http://mumble.net/~campbell/scheme/style.txt
Copyright (C) 2007--2011 Taylor R. Campbell
CC BY-NC-SA 3.0
flex-flow: row wrap shows how inline text alignment is a special case of flexbox:
TEXT-ALIGN: left | center | right | justify | __ | __
→ JUSTIFY-CONTENT: start | middle | end | space-between | space-around | space-evenly
VERTICAL-ALIGN: top | middle | bottom | __
→ ALIGN-SELF: start | center | end | stretch