Skip to content

Instantly share code, notes, and snippets.

Avatar
👶
hello world!

Iizuka Masashi liquidz

👶
hello world!
View GitHub Profile
@liquidz
liquidz / aws_logs_core.clj
Last active Jun 3, 2021
AWS CLI wrapping script by Babashka
View aws_logs_core.clj
(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]))
View rg_root_files.vim
" 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,
\ }
View cljstache_test.clj
(let [tmpl (str/join "\n" ["first"
""
"{{#arr}}"
"{{val}}"
"{{/arr}}"
""
"{{#arr}}"
"{{val}}"
"{{/arr}}"
""
View gist:5b8036551cbde7db9dbe2264b1a9da2a
$ 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=>
View tiny_blockchain.clj
(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)
View Makefile
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)
View chotto_benri_na_vimrc.md
author uochan
date   2014/07/25
font   VL ゴシック 40
colorscheme hybrid

ちょっと便利になる(かもしれない)10行の.vimrc

@uochan

まずはじめに

View core.typed_annotation_patterns.md

core.typed: Annotation Patterns

core.typed dependencies: [org.clojure/core.typed "0.2.53"]

require: (require '[clojure.core.typed :as t])

Patterns

  • single param
(t/ann f1 [t/Str -> t/Str])
@liquidz
liquidz / css_resources.md
Created Mar 20, 2014 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.
View css_resources.md

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@liquidz
liquidz / javascript_resources.md
Created Mar 20, 2014 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.
View javascript_resources.md

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage