Skip to content

Instantly share code, notes, and snippets.

Luís Oliveira luismbo

Block or report user

Report or block luismbo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:6e6e8dce55d4915e750071b5ce0f3ef8
~/s/typep ❯❯❯ cat compiler-bug.lisp
(in-package :cl-user)
(defclass foo ()
(defun bar ()
(let ((x (non-existing-function-1)))
(when (typep x 'foo)
(non-existing-function-2 x))))
View periodic-scheduler.lisp
(in-package :cl-user)
;;; Vince, A. "Scheduling periodic events." Discrete Applied Mathematics 25.3 (1989): 299-310.
;; * Events E_1, ..., E_n occur periodically with periods m_1, ..., m_n.
;; * x_i denote any occurence time of E_i.
;; * 0 <= x_i <= m_i for all i since E_i recurs at intervals m_i.
;; * Other occurences of E_i are given by x_i + k*m_i, k an integer.
;; * Therefore an n-tuple of times x = (x_1, ..., x_n) determines all occurences of

Keybase proof

I hereby claim:

  • I am luismbo on github.
  • I am luismbo ( on keybase.
  • I have a public key ASCvm-kTgSnAQwHt2mK9XI45slHYkaDh50NBmtR2QXeioAo

To claim this, I am signing this object:

View portuguese+esperanto-emacs-style-prefix.ahk
; mostly by João Távora, some bits by myself
prefixMaybe(ByRef map) {
SendLevel 1
; Read 1 key (L1), Case-Sensitive (C), Ignore backspace (B)
; Ignore other hotkeys (I), TImeout after 0.5 seconds (T0.5)
Input, userKey, L1 C B I T0.5 M, {LControl}{RControl}{LAlt}{RAlt}{LWin}{RWin}{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}{Del}{Ins}{BS}{Capslock}{Numlock}{PrintScreen}{Pause}
; If failed send the "end key" concealed in ErrorLevel
luismbo / repl-read-mode.el
Last active Jun 14, 2016
Tweaked repl-read mode for Xach
View repl-read-mode.el
;;;;; REPL Read Mode
(setq slime-repl-read-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map lisp-mode-map)
(define-key map "\C-m" 'slime-repl-return)
(define-key map [return] 'slime-repl-return)
(define-key map "\C-c\C-b" 'slime-repl-read-break)
(define-key map "\C-c\C-c" 'slime-repl-read-break)
(define-key map [remap slime-indent-and-complete-symbol] 'ignore)
#!/usr/bin/env python
import serial
import json
import requests
luismbo / Makefile
Last active Dec 19, 2015
Project template for Coursera's "Discrete Optimization" course using SBCL.
View Makefile
python submit.pyc
find . \( -name "*~" -name "*.dfsl" -o -name "*.fasl" -o -name "*.fas" -o -name "*.lib" -o -name "*.x86f" -o -name "*.amd64f" -o -name "*.sparcf" -o -name "*.sparc64f" -o -name "*.hpf" -o -name "*.hp64f" -o -name "*.ppcf" -o -name "*.nfasl" -o -name "*.ufsl" -o -name "*.fsl" -o -name "*.lx64fsl" \) -exec rm {} \;
View moptilities.lisp
;;; Example usage:
;;; (defclass foo () ())
;;; (defclass my-metaclass (ensure-superclass-mixin standard-class)
;;; ()
;;; (:default-initargs
;;; :ensured-superclasses '(foo)))
luismbo / cron.root.update-git-mirrors
Created Sep 17, 2011
View cron.root.update-git-mirrors
warn() {
echo "${1}" >&2
die() {
You can’t perform that action at this time.