author uochan
date 2014/07/25
font VL ゴシック 40
colorscheme hybrid
@uochan
(ns foo | |
(:require | |
[babashka.pods :as pods])) | |
;; Babashka pods として clj-kondo を読み込む | |
;; clj-kondo コマンドへのパスが通っている必要あり | |
;; もし clj-kondo コマンドを持っていない場合は Pod registry も利用可能 | |
;; https://github.com/babashka/pod-registry | |
(pods/load-pod "clj-kondo") |
(ns cve-2022-21449 | |
(:import | |
(java.security | |
KeyPairGenerator | |
Signature))) | |
(def key-pair | |
(.. (KeyPairGenerator/getInstance "EC") | |
(generateKeyPair))) |
" requires https://github.com/liquidz/ddu-source-custom-list | |
" cf. https://github.com/mattn/vim-sonictemplate/blob/master/autoload/fzf/sonictemplate.vim | |
function! s:ddu_sonictemplate() abort | |
let id = denops#callback#register( | |
\ {s -> sonictemplate#apply(s, 'n')}, | |
\ {'once': v:true}) | |
call ddu#start({'sources': [ | |
\ {'name': 'custom-list', | |
\ 'params': {'texts': sonictemplate#complete('', '', 0), 'callbackId': id}}]}) | |
endfunction |
(ns aws.logs.core | |
"AWS CLI wrapper for `logs` service | |
https://docs.aws.amazon.com/cli/latest/reference/logs/index.html | |
You need to install AWS CLI and run `aws configure` beforehand." | |
(:require | |
[cheshire.core :as json] | |
[clojure.java.shell :as shell] | |
[clojure.string :as str])) |
" autoload/clap/provider/rg_root_files.vim | |
" nnoremap <C-p> :<C-u>Clap rg_root_files ++externalfilter=fzf +async<CR> | |
let s:save_cpo = &cpoptions | |
set cpoptions&vim | |
let s:rg_root_files = { | |
\ 'sink': 'e', | |
\ 'enable_rooter': v:true, | |
\ } |
(let [tmpl (str/join "\n" ["first" | |
"" | |
"{{#arr}}" | |
"{{val}}" | |
"{{/arr}}" | |
"" | |
"{{#arr}}" | |
"{{val}}" | |
"{{/arr}}" | |
"" |
$ docker run -it clojure:tools-deps | |
Clojure 1.10.0 | |
user=> (java.net.URL. nil) | |
Execution error (NullPointerException) at java.net.URL/<init> (URL.java:532). | |
null | |
user=> (try (java.net.URL. nil) (catch java.net.MalformedURLException _ "faaaa")) | |
"faaaa" | |
user=> |
(ns clj-tiny-blockchain.core | |
(:require [buddy.hashers :as hashers] | |
[java-time :as t])) | |
(defn- now [] | |
(t/local-date-time)) | |
(defn- hash-block [m] | |
(let [{:keys [index timestamp data previous-hash]} m] | |
(-> (str index timestamp data previous-hash) |
DROPLET_NAME = mytest | |
KEY_NAME = termux | |
DOCTL = $(GOPATH)/bin/doctl | |
CONFIG = $(HOME)/.config/doctl/config.yaml | |
DO_REGION = sgp1 | |
DO_IMAGE = ubuntu-16-10-x64 | |
DO_SIZE = 512mb | |
all: $(DOCTL) $(CONFIG) |