Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Buggered if I know

Matthew Kennedy lispnik

💭
Buggered if I know
View GitHub Profile
View my-macos-toolbox.txt
My macOS Toolbox
* https://brew.sh
** https://github.com/railwaycat/homebrew-emacsmacport
* https://www.hammerspoon.org
* https://karabiner-elements.pqrs.org
* https://rectangleapp.com
* https://postgresapp.com
* https://www.jetbrains.com/toolbox-app/
* https://github.com/nvm-sh/nvm
@lispnik
lispnik / buildnotes.org
Created Aug 4, 2021
notes on building tecgraf libs on centos 7
View buildnotes.org

Notes on Building Tecgraf Libraries on CentOS 7

sudo yum install -y epel-release svn perl make gcc gcc-c++ \
     webkitgtk3-devel lua-devel lua-static fftw-devel \
     redhat-lsb mesa-libGLU-devel
View foo.lisp
(ql:quickload '("clack" "lack" "lack-middleware-mount" "cl-dotenv" "quri" "uuid" "dexador" "jsown"))
(defpackage #:example
(:use #:common-lisp))
(in-package #:example)
(.env:load-env (merge-pathnames ".env"))
(defvar *okta-authorize-uri* (quri:uri (uiop:getenv "OKTA_AUTHORIZE_URI")))
@lispnik
lispnik / boot.lisp
Created Jul 7, 2020
cl-migratum example
View boot.lisp
(defvar *connection-pool*
(anypool:make-pool :name "dbi-connections"
:connector (lambda ()
(dbi:connect :postgres
:database-name (uiop:getenv "POSTGRES_DATABASE_NAME")
:host (uiop:getenv "POSTGRES_HOST")
:port (parse-integer (uiop:getenv "POSTGRES_PORT"))
:username (uiop:getenv "POSTGRES_USERNAME")
:password (uiop:getenv "POSTGRES_PASSWORD")))
:disconnector #'dbi:disconnect
View .sbclrc
(sb-ext:restrict-compiler-policy 'debug 3)
(sb-ext:set-sbcl-source-location (merge-pathnames ".local/src/sbcl" (user-homedir-pathname)))
#-quicklisp
(let ((quicklisp-init (merge-pathnames "Quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
(ql:quickload "cffi")
View gist:5b26719f0847ebfa0970f676c7b7982e
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload '("iup" "chanl" "bordeaux-threads")))
(defpackage #:iup-examples.listener
(:use #:common-lisp)
(:export #:listener))
(in-package #:iup-examples.listener)
(defvar *idle-action-lock* (bt:make-lock "idle-action"))
View animate.lisp
(ql:quickload "sdl2")
(ql:quickload "sdl2-image")
(defun run ()
(sdl2:with-init (:everything)
(sdl2:with-window (win :flags '(:shown))
(sdl2:with-renderer (renderer win :flags '(:renderer-accelerated))
(let* ((surface-frames 23)
(surface (sdl2-image:load-image "out.png"))
(texture (sdl2:create-texture-from-surface renderer surface))
View cffi-asdf-macports-example.lisp
#+(and asdf darwin)
(defmethod asdf:perform :after ((o asdf:load-op) (c (eql (asdf:find-system "cffi"))))
(let ((library-directories (intern "*FOREIGN-LIBRARY-DIRECTORIES*" (find-package "CFFI"))))
(set library-directories
(cons #p"/opt/local/lib/" (symbol-value library-directories)))))
@lispnik
lispnik / init.el
Created Feb 12, 2016
~/.emacs.d/init.el
View init.el
(if window-system
(tool-bar-mode -1)
(menu-bar-mode -1))
(when (eq window-system 'ns)
(add-to-list 'default-frame-alist '(height . 80))
(add-to-list 'default-frame-alist '(width . 132)))
(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
View Makefile
#
# Makefile - blinkasm.elf
#
# Author: Rick Kimball
# email: rick@kimballsoftware.com
# Version: 1.03 Initial version 10/21/2011
APP=blinkasm
MCU=msp430g2553