Skip to content

Instantly share code, notes, and snippets.

View gpadd's full-sized avatar

Andreas Wilfer gpadd

View GitHub Profile
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@FredEckert
FredEckert / framebuffer.c
Created August 22, 2012 13:15
Paint Pixels to Screen via Linux FrameBuffer
/*
To test that the Linux framebuffer is set up correctly, and that the device permissions
are correct, use the program below which opens the frame buffer and draws a gradient-
filled red square:
retrieved from:
Testing the Linux Framebuffer for Qtopia Core (qt4-x11-4.2.2)
http://cep.xor.aps.anl.gov/software/qt4-x11-4.2.2/qtopiacore-testingframebuffer.html
*/
@raelgc
raelgc / Email Server (Linux, Unix, Mac).md
Last active July 20, 2024 22:07
Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

1 - Point localhost.com to your machine

Most of programs will not accept an email using just @localhost as domain. So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:

127.0.0.1 localhost.com

2 - Install Postfix

@ijp
ijp / fib-quine.scm
Created September 11, 2013 12:56
a fibonacci "quine"
((lambda (i j self)
(list self j (+ i j) (list (quote quote) self)))
0
1
'(lambda (i j self)
(list self j (+ i j) (list (quote quote) self))))
@ijp
ijp / virus.scm
Created September 11, 2013 13:17
#!/usr/bin/env guile
!#
((lambda (count self)
(format #t "virus version ~a~%" count)
(when (> count 10)
(format #t "10 times is quite enough silliness, thank you\n")
(quit 0))
(call-with-output-file (string-append "/tmp/foo" (number->string count))
(lambda (out)
(format out "#!/usr/bin/env guile\n!#\n")

Taylanub Homework

Day 1 Remove

Write Remove

Your task today is very simple. Write a ‘remove’ procedure. It takes two arguments: a value, and a well formed list, and it should remove the left-most occurence of the value in the list (as determine by eqv?).

Sharing

Rewrite the above procedure so that it shares as much of a tail as possible with the original procedure. In particular, if the element

@ijp
ijp / lc.scm
Created October 27, 2013 15:25
;;; Lambda calculus interpreter with precomputed free variables
(use-modules (srfi srfi-1)
(srfi srfi-9)
(ice-9 match))
;;; Set Type
(define set list)
(define member? member)
(define (union s1 s2)
(lset-union eqv? s1 s2))
; ___ _ __ ___ __ ___
; / __|_ _ __ _| |_____ / /| __|/ \_ )
; \__ \ ' \/ _` | / / -_) _ \__ \ () / /
; |___/_||_\__,_|_\_\___\___/___/\__/___|
; An annotated version of the snake example from Nick Morgan's 6502 assembly tutorial
; on http://skilldrick.github.io/easy6502/ that I created as an exercise for myself
; to learn a little bit about assembly. I **think** I understood everything, but I may
; also be completely wrong :-)
@lbruder
lbruder / lbForth.c
Created April 6, 2014 15:21
A minimal Forth compiler in ANSI C
/*******************************************************************************
*
* A minimal Forth compiler in C
* By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com
* Release 2014-04-04
*
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial
*
* PUBLIC DOMAIN
*
@tom-galvin
tom-galvin / mapwacom
Last active January 17, 2024 12:23
Mapwacom script
#!/bin/bash
# mapwacom script
MAPWACOM=$(basename $0)
EXIT_CODE_BAD_DEVICE=82
EXIT_CODE_NO_SUCH_DEVICE=80
EXIT_CODE_NO_SUCH_SCREEN=81
EXIT_CODE_MISSING_DEPS=83
EXIT_CODE_USAGE=64