Skip to content

Instantly share code, notes, and snippets.

View digikata's full-sized avatar

Alan Chen digikata

View GitHub Profile
@digikata
digikata / ANSI.md
Created March 12, 2023 23:55 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@digikata
digikata / work_queue.rs
Created August 30, 2017 18:10 — forked from NoraCodes/work_queue.rs
An example of a parallel work scheduling system using only the Rust standard library
// Here is an extremely simple version of work scheduling for multiple
// processors.
//
// The Problem:
// We have a lot of numbers that need to be math'ed. Doing this on one
// CPU core is slow. We have 4 CPU cores. We would thus like to use those
// cores to do math, because it will be a little less slow (ideally
// 4 times faster actually).
//
// The Solution:
@digikata
digikata / userContent.css
Created March 9, 2016 17:05 — forked from graue/userContent.css
My userContent.css for Firefox (makes Hacker News comments and Humbug messages more readable)
@-moz-document url-prefix(https://news.ycombinator.com) {
.comment {
font-family: Alegreya, serif !important;
font-size: 15pt !important;
}
.comment code {
font-family: Inconsolata-g, fixed !important;
font-size: 10pt !important;
}
@digikata
digikata / Go.sublime-build
Last active August 29, 2015 14:09 — forked from Machx/Go.sublime-build
Golang build system file for Sublime Text 3
{
"cmd": ["go build"],
"selector": "source.go",
"path": "/usr/local/go/bin",
"working_dir": "${file_path}",
"shell": true,
"file_regex": "^([^:\n]+):([0-9]+)",
"variants": [
[
{ "keys": ["f9"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["ctrl+f9"], "command": "alignment" },
// from Ctags
{ "keys": ["f12"], "command": "navigate_to_definition" },
{ "keys": ["shift+f12"], "command": "show_symbols" },
{ "keys": ["ctrl+f12"], "command": "jump_back" },
{ "keys": ["ctrl+shift+f12"], "command": "show_symbols", "args" : {"type": "multi" } },