Skip to content

Instantly share code, notes, and snippets.

View Gallefray's full-sized avatar

Finn O'leary Gallefray

  • Wales, Great Britain
View GitHub Profile
(pipe (pipe (exec 'cat file.txt')
(exec 'grep -i \'hello\''))
(exec 'less'))
arg1: db 'hello world'
push arg1
exec echo
----------------------
arg: db 'file1.txt'
arg0: db 'hello world'
arg1: db '-i'
push arg
pipe cat
@Gallefray
Gallefray / main.c
Last active August 29, 2015 14:03
Delay string drawing -- Psuedocode/C
// give it a character string, the length of the line and time to wait before drawing the next char
void draw_string(int delay, int line_length, char str[])
{
int i, j;
for (i = 0, j = 0; str[i] < string_length(str); i++, j++)
if (j > line_length) {
draw_char(NEWLINE);
j = 0;
}
draw_char(str[i]);
@Gallefray
Gallefray / better-fibonacci.lisp
Last active August 29, 2015 14:03
Better fibonacci
(setq fibonacci-list `(0 1 1 2 3 5 8 13 21 34 55))
(defun compute-fibonacci (n)
(let ((x (+ (get-fibonacci (- n 1))
(get-fibonacci (- n 2)))))
(prog2
(setq fibonacci-list (append fibonacci-list (list x)))
x)))
@Gallefray
Gallefray / Streams
Last active August 29, 2015 14:00
Streaming websites.
Twitch - http://www.twitch.tv
Picarto - https://www.picarto.tv/
Hitbox - http://www.hitbox.tv
Vaughn Live - http://vaughnlive.tv/
Instagib - http://instagib.tv/
Bambuser - http://bambuser.com/
AzubuTV - http://www.azubu.tv
Connect Cast TV - https://www.connectcast.tv/
@Gallefray
Gallefray / Evil assembly language
Last active August 29, 2015 13:57
Evil assembly language, courtesy of a talk I have had with antonijn
The general registers:
¹ ½ ¾
binary:
²
trinary:
³
push:
@Gallefray
Gallefray / gist:6718845
Created September 26, 2013 18:52
This is my Screencasting script for Manjaro Linux 0.8.7.1. AFAIK it also works on Arch Linux. Taken from this comment on YouTube: http://www.youtube.com/watch?v=BuKo0l3ZfEE&lc=KerskmjLKoaYF2fLbc9FmUvi3eDASKddJ_OA63puF7Y Modified slightly to make it extensible.
#!/bin/zsh
audiochannels=2
fps=15
inres=1280x1024
audiocodec=pcm_s16le
videocodec=libx264
preset=ultrafast
threads=0
outfile=output.mkv