This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* XPM */ | |
static char *bn[] = { | |
/* columns rows colors chars-per-pixel */ | |
"45 45 76 1", | |
" c black", | |
". c gray1", | |
"X c #060606", | |
"o c #0C0C0C", | |
"O c #0E0E0E", | |
"+ c gray6", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar *x-colors* | |
'(("black" "#000000") | |
("DimGrey" "#696969") | |
("DimGray" "#696969") | |
("dim grey" "#696969") | |
("dim gray" "#696969") | |
("DarkGrey" "#a9a9a9") | |
("DarkGray" "#a9a9a9") | |
("dark grey" "#a9a9a9") | |
("dark gray" "#a9a9a9") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defparameter *funs* '(FLOOR FFLOOR CEILING FCEILING TRUNCATE FTRUNCATE ROUND FROUND)) | |
(defparameter *types* | |
'((double-float 10d0) | |
(single-float 30f0) | |
(integer 31) | |
(ratio 1/2 3/2 1/255))) | |
(defun make-test-case (fun number-type divisor-type) | |
(let ((inputs (cdr (assoc number-type *types*))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun %find-in-map (x &optional (map "/home/stas/sbcl-arm64/output/cold-sbcl.map")) | |
(when (symbolp x) | |
(setf x | |
(parse-integer (string x) :radix 16 :start 2))) | |
(with-open-file (stream map) | |
(loop until (char= (read-char stream) #\Page)) | |
(read-line stream) | |
(read-line stream) | |
(read-line stream) | |
(loop with address |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defconstant +core-magic+ (logior (ash (char-code #\S) 24) | |
(ash (char-code #\B) 16) | |
(ash (char-code #\C) 8) | |
(char-code #\L))) | |
(defconstant +build-id-core-entry-type-code+ 3860) | |
(defconstant +new-directory-core-entry-type-code+ 3861) | |
(defconstant +initial-fun-core-entry-type-code+ 3863) | |
(defconstant +page-table-core-entry-type-code+ 3880) | |
(defconstant +end-core-entry-type-code+ 3840) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <dbus/dbus.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#ifdef LOG_ERRORS | |
#include <syslog.h> | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# /etc/udev/rules.d/garmin-edge.rules: | |
# SUBSYSTEM=="usb", ATTR{idVendor}=="091e", ATTR{idProduct}=="2491", ACTION=="add", RUN="/bin/su stas -c 'screen -d -m -S garmin ~/c/bin/upload-garmin'" | |
while ! mount /mnt/garmin; do | |
sleep 2 | |
done | |
export PATH=$PATH:/usr/bin:/usr/local/bin | |
export DISPLAY=:0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(eval-when (:compile-toplevel :load-toplevel :execute) | |
(:asd :cxml-stp) | |
(:asd :closure-html)) | |
(defun parse-html (file) | |
(with-open-file (stream file | |
:element-type 'unsigned-byte) | |
(chtml:parse stream (stp:make-builder)))) | |
(defun elementp (x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar key-stats-commands ()) | |
(defun key-stats-record-command () | |
(when (and (stringp (this-command-keys)) | |
(not (eql this-command 'self-insert-command))) | |
(let* ((keys (this-command-keys)) | |
(keys-list (assoc major-mode key-stats-commands)) | |
(command (assoc keys (cdr keys-list)))) | |
(cond (command | |
(incf (cdr command))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(eval-when (:compile-toplevel :load-toplevel :execute) | |
(:asd :drakma) | |
(:asd :babel) | |
(:asd :cl-json)) | |
(defpackage post | |
(:use :cl)) | |
(in-package :post) |