View: http://bl.ocks.org/eiri/5c166c1fef95e41835fd02df81f83c90
| def print_nerd_font(): | |
| print('# Nerd - Pomicons:') | |
| for c in range(0xe000, 0xe00b): | |
| print(f'{hex(c)} - {chr(c)}') | |
| print('# Nerd - Powerline + extra:') | |
| for c in range(0xe0a0, 0xe0a4): | |
| print(f'{hex(c)} - {chr(c)}') | |
| for c in range(0xe0b0, 0xe0c9): | |
| print(f'{hex(c)} - {chr(c)}') |
| #!/usr/bin/env escript | |
| %% -*- erlang -*- | |
| %%! -s -pa src/erlfdb/ebin | |
| -define(CLUSTER_FILE, <<"/usr/local/etc/foundationdb/fdb.cluster">>). | |
| -define(DIR, <<"test">>). | |
| -define(KEY, <<"counter">>). | |
| -define(TIMEOUT, 1000). |
Grab a data file. "American movies scraped from Wikipedia" is a nice condence set at size 3.4M
wget https://raw.githubusercontent.com/prust/wikipedia-movie-data/master/movies.json -O movies.json
Slice movies made from 1920 till 1930 and output them line by line
jq -cr '.[] | select(.year >= 1920 and .year <= 1930)' movies.json
Pass the output to reducer to group by year, calculate total movies per year and accumulate movies into "movies" array in each block
Command line utility cheat https://github.com/cheat/cheat is kind of a man alternative.
brew install cheat
mkdir -p ~/.config/cheat && cheat --init > ~/.config/cheat/conf.yml
edit to following (a list of avail styles at https://github.com/alecthomas/chroma/tree/master/styles)
| sub.DEFAULT_GOAL := check | |
| .EXPORT_ALL_VARIABLES: | |
| CURL_HOME = $(CURDIR) | |
| JAR = $(CURDIR)/jar | |
| DB = http://localhost:15984 | |
| ADM_CRD = '{"username":"admin", "password": "admin"}' | |
| USR_CRD = '{"name":"eiri", "password": "eiri"}' |
| FROM node:8.11-alpine | |
| RUN npm install --global gitbook-cli && \ | |
| gitbook fetch 3.2.2 && \ | |
| gitbook install && \ | |
| npm cache clear --force && \ | |
| rm -rf /tmp/* | |
| # Fixes https://github.com/GitbookIO/gitbook/issues/1309 | |
| RUN sed -i.bak 's/confirm: true/confirm: false/g' \ |
Error: The operation couldn’t be completed. (com.apple.commerce.client error 500.)
Fix: defaults write com.apple.appstore.commerce Storefront -string "$(defaults read com.apple.appstore.commerce Storefront | sed s/,8/,13/)"
Ref: https://discussions.apple.com/thread/250154403?answerId=250306539022#250306539022
| KERL_DEFAULT_INSTALL_DIR=/opt/erlang | |
| KERL_CONFIGURE_OPTIONS="--enable-debug --without-javac --enable-shared-zlib --enable-dynamic-ssl-lib --disable-hipe --enable-smp-support --enable-threads --enable-kernel-poll --with-wx --with-ssl=/usr/local/opt/openssl" |