Skip to content

Instantly share code, notes, and snippets.

View peanutbutterandcrackers's full-sized avatar

peanutbutterandcrackers

View GitHub Profile
@john-science
john-science / build_your_own_lisp.md
Last active September 18, 2024 08:50
Build Your Own LISP

Build Your Own LISP

I had fun building my own LISP (Slow Loris). The project was extremely easy to get off the ground, because there a ton of resources to do just this. I thought it might be handy to have a little links round-up, based on my research.

In Python

There are already several good projects out there on writing your own LISP in Python.

Peter Norvig's LisPy

@shockalotti
shockalotti / Go Golang - recursive function, fibonacci sequence
Created May 28, 2014 03:03
Go Golang - recursive function, fibonacci sequence
package main
import "fmt"
func fib(n uint) uint {
if n == 0 {
return 0
} else if n == 1 {
return 1
} else {
@HansNewbie
HansNewbie / Python Turtle Fractal Plant.py
Last active July 18, 2021 20:09
Python Turtle Fractal Plant
# As described in http://en.wikipedia.org/wiki/L-system#Example_7:_Fractal_plant
import turtle
ruleInput = ['F', 'X']
ruleOutput = ["FF", "F-[[X]+X]+F[+FX]-X"]
start = "X"
front = 5
turn = 30
stack = []
@jwalanta
jwalanta / ne-trad.mim
Created October 11, 2013 15:14
Fixed ne-trad.mim (Nepali traditional input layout). Replace content of /usr/share/m17n/ne-trad.mim with this.
;; ne-trad.mim -- Nepali input method for traditional layout
;; This files implements the traditional keyboard layout published by MPP.
;; Copyright (c) 2005 Suyash Shrestha <[email protected]>
;; This file is part of the m17n contrib; a sub-part of the m17n
;; library.
;; The m17n library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
;; as published by the Free Software Foundation; either version 2.1 of
@robmiller
robmiller / git-cleanup-repo
Last active November 24, 2024 19:55
A script for cleaning up Git repositories; it deletes branches that are fully merged into `origin/master`, prunes obsolete remote tracking branches, and as an added bonus will replicate these changes on the remote.
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <[email protected]>
# Adapted from the original by Yorick Sijsling
git checkout master &> /dev/null
# Make sure we're working with the most up-to-date version of master.
git fetch
@bobbyno
bobbyno / mit_scheme_bindings.txt
Created August 11, 2012 17:53
MIT Scheme bindings suitable for rlwrap completion
#
#!optional
#!rest
#(
#\
#\altmode
#\backnext
#\backspace
#\call
#\linefeed
@ajshort
ajshort / export-layers.py
Created November 26, 2010 03:51
GIMP Python script to export each layer as a separate image.
#!/usr/bin/env python
#
# A GIMP plugin to save each layer in an image as a separate file
from gimpfu import *
import os
def export_layers(img, drw, path, name):
img = img.duplicate()