Skip to content

Instantly share code, notes, and snippets.

View ancms2600's full-sized avatar
💭
Toot! Toot!

Bobby Johnson ancms2600

💭
Toot! Toot!
View GitHub Profile
@ancms2600
ancms2600 / paste.ahk
Created March 26, 2018 17:42
AutoHotkey Script to type out clipboard contents (useful for VMWare vSphere Remote Console, which cannot paste)
; Ctrl-Shift-O
^!o::
; wait 2 seconds
Sleep, 2000
; type out clipboard contents
sendraw %clipboard%
@ancms2600
ancms2600 / es6-shorthand-classes.js
Last active March 15, 2018 19:04
lol shorthand es6 class syntax
// LOL! Look at this...
// This class syntax is very shorthand, inline, and anonymous.
// However I'm skeptical that the runtime interpreter is able to optimize it
// like traditional class semantics.
// class
const State = () => ({
// constructor
object: {},
array: [],
@ancms2600
ancms2600 / notes.txt
Last active February 13, 2018 22:20
Declarative vs. Imperative, Procedural vs. Object-oriented vs. Functional Programming
Declarative programming: Expresses the logic of a computation without describing its control flow. (e.g., no loops)
e.g., SQL, RegExp, Markdown
example: SELECT * FROM table;
Imperative programming: Uses statements that change a program's state. Consists of commands for the computer to perform.
e.g., OpenGL, Canvas, Turtle, GCode, ASM, FORTRAN, SVG
example: while (true): up(1); right(2); stroke(); done();
Procedural programming: Derived from structured programming, based upon the concept of the procedure call.
Procedures, also known as routines, subroutines, or functions (not to be confused with mathematical functions,
@ancms2600
ancms2600 / hidden-prompt.sh
Created December 18, 2017 15:54
Hidden bash password prompt
# from: https://unix.stackexchange.com/a/165494
echo -n "passwd: "; stty -echo; read passwd; stty echo; echo
some-program -p "$passwd"
passwd= # cleanup