View Makefile
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
artifactId = a | |
directory = build | |
outputDirectory = $(directory)/classes/java/main | |
sourceDirectory = src/main/java | |
sources = $(shell find $(sourceDirectory) -name \*.java) | |
objects = $(sources:$(sourceDirectory)/%.java=$(outputDirectory)/%.class) | |
package = $(directory)/libs/$(artifactId).jar | |
JAR = jar | |
JAR_FLAGS = cvf |
View .tmux.conf
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
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
set-option -g default-terminal "screen-256color" | |
set-option -g escape-time 50 | |
set-option -g focus-events on | |
set-option -g history-limit 10000 | |
set-option -g mouse on | |
set-option -g status-bg default | |
set-option -g status-fg default |
View trie.js
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
/* trie.js */ | |
class TrieNode { | |
constructor(value) { | |
this.value = value; | |
this.children = new Map(); | |
this.isEndOfWord = false; | |
} | |
} |
View acmestart.sh
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 | |
# | |
# Using it with the Go fonts | |
# git clone https://go.googlesource.com/image | |
# sudo bash -c 'cp image/font/gofont/ttfs /usr/share/fonts/truetype/go && fc-cache -f -v' | |
# acmestart -f /mnt/font/GoRegular/11a/font -F /mnt/font/GoMono/11a/font | |
# | |
set -e |
View install-userkeymap.sh
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 | |
# Remapping Keys in macOS | |
# https://developer.apple.com/library/archive/technotes/tn2450/_index.html | |
set -e | |
userscript="$HOME/bin/userkeymap" | |
mkdir -p "$HOME"/bin | |
cat <<EOF > "$userscript" | |
#!/bin/bash | |
hidutil property --set '{"UserKeyMapping": [ | |
{"HIDKeyboardModifierMappingSrc": 0x700000064, "HIDKeyboardModifierMappingDst": 0x700000035} |
View Dockerfile
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
FROM debian:buster | |
ENV SHELL=/bin/bash | |
RUN apt-get update -y && apt-get install -y \ | |
bash-completion \ | |
build-essential \ | |
cmake \ | |
ctags \ | |
curl \ | |
git \ | |
git-extras \ |
View kindle-clean.py
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import argparse | |
import collections | |
import os | |
import shutil | |
parser = argparse.ArgumentParser() | |
parser.add_argument("dirpath") |
View collection.sql
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
CREATE TABLE IF NOT EXISTS `collection` ( | |
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, | |
`uuid` BINARY(16) NOT NULL, | |
`value` MEDIUMBLOB NOT NULL, | |
`version` BIGINT UNSIGNED NOT NULL DEFAULT 1 COMMENT 'optimistic updates', | |
`format` ENUM ('R', 'J', 'M') NOT NULL DEFAULT 'J' COMMENT 'R: raw, J: json, M: msgpack', | |
`compression` ENUM ('N', 'Z') NOT NULL DEFAULT 'N' COMMENT 'N: none, Z: gzip', | |
`deleted_at` DATETIME NULL DEFAULT NULL, | |
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
`updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
View escapeHTML.js
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
const entity = { | |
"&": "&", | |
"<": "<", | |
">": ">", | |
'"': """, | |
"'": "'", | |
"`": "`", | |
"=": "=" | |
}; |
View htag.js
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
/* | |
htag.js | |
A Bare bones interpretation of the Hyperscript syntax. | |
*/ | |
var h = function h(tag, attributes, ...children) { | |
const node = document.createElement(tag); | |
attributes = attributes || {}; | |
Object.keys(attributes).forEach(attr => { | |
if (attr === "style" || attr === "dataset") { | |
const value = attributes[attr]; |
NewerOlder