Skip to content

Instantly share code, notes, and snippets.

View paigeruten's full-sized avatar

Paige Ruten paigeruten

View GitHub Profile
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"

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:

#include <stdio.h>
#include <unistd.h>
#include <termios.h>
int main() {
int i;
struct termios t;
tcgetattr(STDIN_FILENO, &t);
  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.
#lang plai
;; Recursion (via special environments)
;; Procedures (lexical)
;; Conditionals
;; With (via Lexical Environments)
;; and Arithmetic Expressions and Primitives
;; LAZY-EVALUATION
@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;
#include <stdio.h>
#include <openssl/evp.h>
int main(void) {
unsigned char plaintext[] = "AAAAAAAAAAAAAAAA";
unsigned char key[] = "BBBBBBBBBBBBBBBB";
unsigned char iv[] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
unsigned char res[32];
// Encrypting
@paigeruten
paigeruten / avconcat.rb
Created April 18, 2014 14:22
wrapper for a messy avconv command to concatenate audio files.
#!/usr/bin/env ruby
#
# Concatenates audio files together using avconv.
#
# Usage: avconcat -o <output> <inputs...>
#
output = nil
output_arg = false
@paigeruten
paigeruten / alarm.rb
Created October 30, 2013 05:09
a simple command line alarm clock, I use it to play some music when the alarm goes off.
#!/usr/bin/ruby
#
# Usage: ruby alarm.rb <time>
#
# <time> is either a number of seconds (e.g. "50"), minutes and seconds
# (e.g. "5:30"), or hours minutes and seconds (e.g. "7:30:00"). After the
# specified amount of time has passed, ring_alarm will be called and the
# program will exit.
#