Skip to content

Instantly share code, notes, and snippets.

View ojarjur's full-sized avatar

Omar Jarjur ojarjur

View GitHub Profile
@ojarjur
ojarjur / tetris.html
Created April 28, 2019 02:00
An implementation of Tetris in HTML that I implemented back in 2008
<!--
Copyright (C) 2008 Omar Jarjur. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@ojarjur
ojarjur / keybase.md
Created June 1, 2018 20:45
keybase.md

Keybase proof

I hereby claim:

  • I am ojarjur on github.
  • I am ojarjur (https://keybase.io/ojarjur) on keybase.
  • I have a public key ASAha6hqWuG5Iwf0DKWCf3QTAjhy1Mfr2g4SMBA8Nu011go

To claim this, I am signing this object:

(load "~/losak/lsk-mode.el")
(defun my-scheme-mode-hook ()
"Custom hook for Scheme mode"
(setq indent-tabs-mode nil))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(gud-gdb-command-name "gdb --annotate=1")
(define (cps expr)
(define (cps-arg arg)
(if (and (pair? arg) (not (eq? (car arg) 'lambda)))
`(let ((pending? #t)
(arg-val '<undefined>))
(lambda (k)
(if pending?
,(cps-nested arg
(lambda (arg-code)
`(begin (set! pending? #f)
@ojarjur
ojarjur / scmfmt.scm
Created October 10, 2013 19:22
Code formatter for Scheme using Guile's pretty-print method. This reads from stdin and writes to stdout.
(use-modules (ice-9 pretty-print))
;; Helper methods for maintaining comments and whitespace.
(define (copy-line-comment)
(let ((char (read-char)))
(if (not (eof-object? char))
(if (eq? char #\newline)
(newline)
(begin (write-char char) (copy-line-comment))))))
(define (maintain-empty-lines)