Skip to content

Instantly share code, notes, and snippets.

View disruptek's full-sized avatar
🧹
aspiring janetor

Smooth Operator disruptek

🧹
aspiring janetor
View GitHub Profile
@disruptek
disruptek / direct_tty.ss
Created February 12, 2022 04:42 — forked from clartaq/direct_tty.ss
Raw Terminal Input in Chez Scheme
;;
;; direct_tty.ss
;;
;; This is a demonstration program using some of the Chez Scheme FFI to put the
;; terminal into "raw" mode, read a line of characters, possibly containing
;; control characters that would normally terminate input, without echoing
;; the characters typed. Once the user presses the line termination character,
;; (user defined), the program displays the line.
;;
;; The program shows how to obtain character-by-character input with
@disruptek
disruptek / languages-and-vms.md
Created October 22, 2020 21:05 — forked from haxscramper/languages-and-vms.md
languages-and-vms

Language & VM design

Lexing & parsing

Writing own parser

  1. nimly - Lexer Generator and Parser Generator as a Library in Nim.

    With nimly, you can make lexer/parser by writing definition in formats like lex/yacc. nimly generates lexer and parser by using macro in compile-time, so you can use nimly not as external tool of your program but as a library.

@disruptek
disruptek / meow.nim
Created August 7, 2020 21:55 — forked from genotrance/meow.nim
Nim wrapper for meow hash using nimterop
import strutils
import nimterop/[build, cimport]
const
baseDir = getProjectCacheDir("meow")
static:
gitPull(
"https://github.com/cmuratori/meow_hash",
@disruptek
disruptek / quickjs.nim
Created July 15, 2020 16:57 — forked from genotrance/quickjs.nim
Nim wrapper for quickjs using nimterop
# nim c -d:FLAGS quickjs.nim
#
# FLAGS
# -d:quickjsGit
# -d:quickjsSetVer=
# -d:quickjsStatic
import os
import nimterop/[build, cimport]
@disruptek
disruptek / aws.nim
Created January 9, 2020 23:06 — forked from Varriount/aws.nim
AWS Request Signing for Nim. Requires the `nimcrypto` package.
import strutils
import tables
import algorithm
import httpcore
import unicode
import strformat
import times
import nimcrypto
import httpclient
import utils
@disruptek
disruptek / .travis.yml
Created December 18, 2019 02:54 — forked from genotrance/travis.sh
Travis CI setup for Nim
os:
- windows
- linux
- osx
language: c
env:
- BRANCH=0.19.6
- BRANCH=0.20.2
@disruptek
disruptek / org-syntax-cheatsheet.org
Created July 29, 2019 14:30 — forked from wdkrnls/org-syntax-cheatsheet.org
Org-mode Syntax Cheat sheet

Markup Cheat sheet for Org-mode

Heading 1

Heading 2: Set a deadline and a schedule

[66%] Heading 3: a list with checkboxes

  1. [X] task 1
  2. [X] task 2
  3. [ ] task 3
@disruptek
disruptek / Readme.md
Created July 8, 2017 23:39 — forked from vicapow/Readme.md
WebGL + d3.layout.force

This demo uses d3.layout.force() to calculate the node positions and then passes those to webGL to render them on the GPU.

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@disruptek
disruptek / index.html
Created March 12, 2016 22:30 — forked from JoshMock/index.html
Infinite scrolling CompositeView
<!DOCTYPE HTML>
<html>
<head>
<style type="text/css" media="all">
#main {
width: 300px;
height: 400px;
overflow: scroll;
}