Skip to content

Instantly share code, notes, and snippets.

View a13x's full-sized avatar

Aleksandar Radulovic a13x

View GitHub Profile
@a13x
a13x / epaper.rs
Created November 6, 2022 12:08
Testing the Waveshare Epaper 5.65f with epd-waveshare rust package
use anyhow;
use embedded_hal::prelude::*;
use esp_idf_hal::gpio;
use esp_idf_hal::prelude::*;
use esp_idf_hal::spi;
use esp_idf_hal::delay::FreeRtos;
use epd_waveshare::{epd5in65f::Epd5in65f, prelude::*};
Verifying that +a13x is my blockchain ID. https://onename.com/a13x
@a13x
a13x / imger.lisp
Created February 26, 2016 10:43
Serving image via output stream with ningle, running on woo
(ql:quickload :clack :silent t)
(ql:quickload :vecto :silent t)
(ql:quickload :ningle :silent t)
(ql:quickload :babel :silent t)
(ql:quickload :babel-streams :silent t)
(in-package :cl-user)
(defpackage imger
(:use :cl :ningle :babel :babel-streams :vecto)
@a13x
a13x / gist:3b9cd364f842d7a812f1
Created February 22, 2016 09:09
Linedit installation fail with SBCL 1.3.2 on OSX El Capitan
 ~/ sbcl --version
SBCL 1.3.2
 ~/ sbcl
This is SBCL 1.3.2, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
@a13x
a13x / dicecoef.scm
Created October 30, 2014 12:19
Dice coeficient in Scheme
#!/usr/local/bin/gsi-script
(define (bigram lst)
(cons (car lst) (cadr lst)))
(define (bigrams lst)
(if (> (length lst) 2)
(cons (bigram lst) (bigrams (cdr lst)))
(cons (bigram lst) '())))
@a13x
a13x / bobobench.py
Created February 23, 2011 15:47
Standalone webapp benchmark w/ Bobo framework
#!/usr/bin/env python
import bobo
@bobo.query('/:txt/:num')
def serve(txt, num):
return '\n'.join("%d: %s" % (i, txt) for i in xrange(int(num)))
application = bobo.Application(bobo_resources=__name__)