sudo apt-get install sbcl
curl -O http://beta.quicklisp.org/quicklisp.lisp
sbcl --load quicklisp.lisp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
UNAME=$(uname) | |
if [ "$UNAME" == "Linux" ] ; then | |
echo "Linux" | |
elif [ "$UNAME" == "Darwin" ] ; then | |
echo "Darwin" | |
elif [[ "$UNAME" == CYGWIN* || "$UNAME" == MINGW* ]] ; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
let looper = (callback) => { | |
let n = 2000000; | |
while (n > 0) { | |
callback(n); | |
n--; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name | wikipedia_url | |
---|---|---|
A# .NET | https://en.wikipedia.org/wiki/A_Sharp_(.NET) | |
A# (Axiom) | https://en.wikipedia.org/wiki/A_Sharp_(Axiom) | |
A-0 System | https://en.wikipedia.org/wiki/A-0_System | |
A+ | https://en.wikipedia.org/wiki/A%2B_(programming_language) | |
A++ | https://en.wikipedia.org/wiki/A%2B%2B | |
ABAP | https://en.wikipedia.org/wiki/ABAP | |
ABC | https://en.wikipedia.org/wiki/ABC_(programming_language) | |
ABC ALGOL | https://en.wikipedia.org/wiki/ABC_ALGOL | |
ABSET | https://en.wikipedia.org/wiki/ABSET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [Created by task 2.5.1 2/19/2017 04:19:13] | |
# Taskwarrior program configuration file. | |
# For more documentation, see http://taskwarrior.org or try 'man task', 'man task-color', | |
# 'man task-sync' or 'man taskrc' | |
# Here is an example of entries that use the default, override and blank values | |
# variable=foo -- By specifying a value, this overrides the default | |
# variable= -- By specifying no value, this means no default | |
# #variable=foo -- By commenting out the line, or deleting it, this uses the default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
# Pure BASH interactive CLI/TUI menu (single and multi-select/checkboxes) | |
# | |
# Author: Markus Geiger <mg@evolution515.net> | |
# Last revised 2019-09-11 | |
# | |
# ATTENTION! TO BE REFACTORED! FIRST DRAFT! | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 通过 typeof 来查看每种数据类型的描述 | |
// [undefined, null, true, '', 0, Symbol(), {}].map(it => typeof it) | |
// ["undefined", "object", "boolean", "string", "number", "symbol", "object"] | |
function clone(obj) { | |
// 添加一个 WeakMap 来记录已经拷贝过的对象,如果当前对象已经被拷贝过,那么直接从 WeakMap 中取出,否则重新创建一个对象并加入 WeakMap 中 | |
// ES6 推出的 WeakMap 对象,该对象是一组键/值对的集合,其中的键是弱引用的。其键必须是对象,而值可以是任意的 | |
let map = new WeakMap(); | |
function deep(data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on the following articles | |
# https://blog.programster.org/generating-gpg-master-and-subkeys | |
# https://risanb.com/code/backup-restore-gpg-key/ | |
# https://gist.github.com/oseme-techguy/bae2e309c084d93b75a9b25f49718f85 | |
gpg_keyid() { | |
gpg2 --list-secret-keys \ | |
| sed -n 's/^ \(\w*\)/\1/p' | |
} |