Skip to content

Instantly share code, notes, and snippets.

View paigeruten's full-sized avatar

Paige Ruten paigeruten

View GitHub Profile
@paigeruten
paigeruten / whyduel.html
Last active September 26, 2015 00:46
_why's original dueling swordsmen Javascript program, ca. 2000
<HTML>
<HEAD>
<TITLE>[why.datablocks.net] : sliding down the porcelain golf course</TITLE>
<META name="description" content="whytheluckystiff is a shoddy programmer, a fountain of convulted knowledge, exhibited in his livid liteStep themes and cursed web show. the navy has been asked to monitor things. they will not, so the traffic coming and going will exclaim 'My God! What is it now?' as each release of some strange product comes out fractured and unwarranted. he is a thief of code, a guilty poser.">
<META name="keywords" content="evil, poor, shifty, catalyst to fine thinking, uncouth, unwell, bad, very bad to the hilt, should be underneath something - anything">
<SCRIPT LANGUAGE="Javascript">
eval(unescape('%69%66%20%28%74%6F%70%2E%66%72%61%6D%65%73%2E%6C%65%6E%67%74%68%21%3D%30%29%0D%0A%74%6F%70%2E%6C%6F%63%61%74%69%6F%6E%3D%73%65%6C%66%2E%64%6F%63%75%6D%65%6E%74%2E%6C%6F%63%61%74%69%6F%6E%3B'));
// BEGIN DHTML FUNCTIONALITY - DO NOT TOUCH
var manTrance = 0;
var manDir = 0;
#lang plai
;; Recursion (via special environments)
;; Procedures (lexical)
;; Conditionals
;; With (via Lexical Environments)
;; and Arithmetic Expressions and Primitives
;; LAZY-EVALUATION
  1. Create a new file named kilo.c.
  2. Write a main() function that takes no arguments and returns 0.
  3. Create a Makefile that compiles kilo.c to kilo when you type make.
    • Use $(CC) for the compiler.
    • Turn on warnings using the -Wall -Wextra -pedantic options.
    • Turn on C99 mode using the -std=c99 option.
  4. In main(), Declare a char variable named c.
  5. Include <unistd.h>.
  6. Read a single byte from standard input into c repeatedly using read(), until read() returns an error or reaches the end of file.
#include <stdio.h>
#include <unistd.h>
#include <termios.h>
int main() {
int i;
struct termios t;
tcgetattr(STDIN_FILENO, &t);

gzg

gzg helps you use git, tar, and gpg to keep a folder of text files synced across your devices using a server you have SSH access to. Each client has a git repo containing the unencrypted text files. All the server has is the encrypted, gzipped, tar'd, bare git repo in a single file called gzg.git.tar.gz.gpg. There is also a gzg.git.tar.gz.gpg.sha1 file used for the clients to check whether their version of the git repo is outdated.

Here's how you would set up a notes directory:

menu:
CLS
LOCATE 10, 30
PRINT "1) Try first two levels"
LOCATE 12, 30
PRINT "2) See New Features"
LOCATE 14, 30
PRINT "3) Quit"
PRINT
PRINT "Select your choice"
  1. The first number is the number of black squares in the row/column
  2. The second number is the number of "groups" of black/white squares in the row/column (see screenshots below)