Skip to content

Instantly share code, notes, and snippets.

View informatimago's full-sized avatar

Pascal J. Bourguignon informatimago

View GitHub Profile
memory: added range 0x1000-0x9f000 (type: 0)
memory: added range 0x100000-0x3fff0000 (type: 0)
memory: initial memory map:
0x0000000000001000-0x000000000004a000: Internal
0x000000000004a000-0x000000000009f000: Free
0x0000000000100000-0x000000003fff0000: Free
disk: boot device ID is 0x80, partition offset is 0x8
disk: found MSDOS partition 0:
type: 0x83
start_lba: 8
(defun make-entity (name hp atk)
(make-instance 'entity :name name :hp hp :atk atk
:actions (list (make-action "attack" #'attack))))
;; in player, instead of
(defmethod attack ((p player) (g game))
(take-damage
(nth
(get-player-action p (enemies g) "Who do you wish to attack?")
(enemies g))
(atk p)))
;; write methods doing only computing:
This file has been truncated, but you can view the full file.
F/3:45:37[pjb@L0231342 :0.0 doc]$ cd /tmp
F/3:45:37[pjb@L0231342 :0.0 tmp]$ git clone https://github.com/informatimago/FreeRDP.git freerdp-test-smartcard-logon-rdp
Cloning into 'freerdp-test-smartcard-logon-rdp'...
remote: Counting objects: 109847, done.
remote: Compressing objects: 100% (1546/1546), done.
remote: Total 109847 (delta 326), reused 220 (delta 15), pack-reused 108282
Receiving objects: 100% (109847/109847), 37.70 MiB | 294.00 KiB/s, done.
Resolving deltas: 100% (83201/83201), done.
Checking connectivity... done.
F/3:45:37[pjb@L0231342 :0.0 tmp]$ cd freerdp-test-smartcard-logon-rdp/
Here is a nice feature; you could patch bash to do it:
every time you run a command, bash would redirect the
output automatically behind the scene. By default it
would tee it to the tty as always, but while the command
is running (and even after, from the history), we could
redirect the output to a file or a pipe, dynamically.
And conversely, when we run a pipe, we could at any time
have a look at the data going thru a pipe. For example
you would type:
(defmacro instruction-case (op &body clauses)
"Maps symbolic instruction names to their internal code (characters):
move-left <
move-right >
increment +
decrement -
read ,
write .
while [
end ]
;; https://www.axess-industries.com/casiers-consignes/armoire-casier-a-effet-personnel-p-150576-600x600.jpg
;; casier: a box protected by a lock!
(terpri) (ql:quickload :bordeaux-threads)
(defstruct casier
value
(lock (bt:make-lock)))
;;;; -*- mode:lisp;coding:utf-8 -*-
;;;;**************************************************************************
;;;;FILE: ccl-socket-example.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
;;;;USER-INTERFACE: NONE
;;;;DESCRIPTION
;;;;
;;;; A little demo using ccl sockets and posix I/O/
;;;;
(in-package :cl-user)
(defun strcat (&rest strings)
(format nil "~{~A~}" strings))
(deftype german-case () `(member :nominative :accusative :dative :genitive))
(deftype german-gender () `(member :masculine :feminine :neuter))
(deftype german-number () `(member :singular :plural))
(defun definite-article (case gender number)