I hereby claim:
- I am theodesp on github.
- I am thdespou (https://keybase.io/thdespou) on keybase.
- I have a public key ASCOxYSHkPXOv7SXou594vZHvAVzj8Lvdwcmpe-36UxOrAo
To claim this, I am signing this object:
/* Image Preloader | |
* imgpreload.js | |
* | |
* A simple Javascript image preloader | |
* Created by Theo Despoudis | |
* (c) 2014 Theo Despoudis. MIT open-source license. | |
*/ | |
; // Debloat | |
(function () { |
/* Script loader | |
* scriptloader.js | |
* | |
* A simple Javascript script loader | |
* Created by Theo Despoudis | |
* (c) 2014 Theo Despoudis. MIT open-source license. | |
*/ | |
function loadScript(url, callback) { |
function List() { | |
this.listSize = 0; | |
this.pos = 0; | |
this.dataStore = []; // initializes an empty array to store list elements | |
this.clear = clear; | |
this.find = find; | |
this.toString = toString; | |
this.insert = insert; | |
this.append = append; | |
this.remove = remove; |
-- Configuration reloader | |
function reloadConfig(files) | |
doReload = false | |
for _,file in pairs(files) do | |
if file:sub(-4) == ".lua" then | |
doReload = true | |
end | |
end | |
if doReload then | |
hs.reload() |
I hereby claim:
To claim this, I am signing this object:
(import (rnrs (6))) | |
(use-modules ((rnrs) :version (6))) |
(import (rnrs (6))) | |
(use-modules ((rnrs) :version (6))) | |
;; Make a variable `call/cc' an alias of `call-with-current-continuation`. | |
(define call/cc call-with-current-continuation) |
(import (rnrs (6))) | |
(use-modules ((rnrs) :version (6))) | |
(define (range from to step) | |
"" Range from to using step | |
(if (>= from to) | |
'() | |
(cons from (range (+ from step) to step)))) |
#!/usr/local/bin/guile \ | |
-e main -s | |
!# | |
(define (main args) | |
;; Usage ./main.scm a b c | |
(map (lambda (arg) (display arg) (display " ")) | |
(cdr args)) | |
(newline)) |
(import (rnrs (6))) | |
(use-modules ((rnrs) :version (6))) | |
(define (safe-first sent) | |
;; Return first if not empty | |
(if (empty? sent) | |
'() | |
(first sent))) |