Skip to content

Instantly share code, notes, and snippets.

Avatar

Jaime Fournier ober

View GitHub Profile
View *compilation*.txt
-*- mode: compilation; default-directory: "~/gambit/" -*-
Compilation started at Mon Aug 6 20:11:42
cd ~/gambit/ && make -f ~/kunabi/Makefile gambit
system is Darwin
git checkout master && git clean -f && git fetch -a && git reset --hard origin/master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
Warning: Permanently added 'github.com,192.30.255.113' (RSA) to the list of known hosts.
HEAD is now at 91a4ad2 Update tests/test5.ok test
@ober
ober / gist:b943723f97002ee8e88e92c7ec3b6fe8
Created Jul 20, 2018
Gerbil master failure on windows 10.
View gist:b943723f97002ee8e88e92c7ec3b6fe8
[*] Building Gerbil
[*] Building gerbil stage0
>>> preparing /cygdrive/c/Users/merc/gerbil/bootstrap
>>> compiling runtime
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/../../../../lib/libcygwin.a(libcmain.o): In function `main':
/usr/src/debug/cygwin-2.10.0-1/winsup/cygwin/lib/libcmain.c:37: undefined reference to `WinMain'
/usr/src/debug/cygwin-2.10.0-1/winsup/cygwin/lib/libcmain.c:37:(.text.startup+0x94): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `WinMain'
collect2: error: ld returned 1 exit status
building gerbil/runtime in /cygdrive/c/Users/merc/gerbil/bootstrap/lib
... compile gx-gambc
View gist:9387a64ccffe063376efb7b6c585aa24
from gerbil/base:ubuntu
ENV PATH='/root/gerbil/bin:/usr/local/gambit/current/bin:/bin:/usr/bin:/sbin:/usr/sbin'
ENV GERBIL_HOME=/root/gerbil
RUN apt update -y
RUN apt install -y emacs-nox tmux
CMD bash
View gist:9cc0f02e40f3c7b77f46582342789ffc
### Keybase proof
I hereby claim:
* I am ober on github.
* I am lisp (https://keybase.io/lisp) on keybase.
* I have a public key whose fingerprint is CBD7 8720 569B BE32 F060 E3E8 9C95 3681 7159 B703
To claim this, I am signing this object:
@ober
ober / ip
Created Jul 12, 2016
netstat in awk
View ip
awk -Wposix 'BEGIN{ printf("{ \"tcp_connections\": [") }; {split($2,src,":");split(src[1],sip,"");split($3,dst,":");split(dst[1],dip,"");if ( NR > 1) printf(",");printf("{");printf("\"srcip\":\"%d.%d.%d.%d\",\"sport\": \"%d\",\"dstip\":\"%d.%d.%d.%d\",\"dport\":\"%d\"}","0x" sip[7] sip[8], "0x" sip[5] sip[6],"0x" sip[3] sip[4],"0x" sip[1] sip[2],"0x" src[2],"0x" dip[7] dip[8], "0x" dip[5] dip[6],"0x" dip[3] dip[4], "0x" dip[1] dip[2],"0x" dst[2]);}END{ print "]}"}' < /proc/net/tcp
@ober
ober / anonymous-gist.lisp
Created May 4, 2016
better format for this?
View anonymous-gist.lisp
(defun parse-ct-contents (x)
(let* ((records (cdr (elt (read-json-gzip-file x) 0)))
(record-size (length records)))
(dolist (x records)
(let* ((event-time (cdr-assoc :EVENT-TIME x))
(user-identity (cdr-assoc :USER-IDENTITY x))
(user-name (cdr-assoc :USER-NAME user-identity))
(user-key (cdr-assoc :ACCESS-KEY-ID user-identity))
;;(user-identity (cdr-assoc :ACCESS-KEY-ID (cdr-assoc :USER-IDENTITY x)))
@ober
ober / anonymous-gist.lisp
Created May 4, 2016
cleaner way to do this?
View anonymous-gist.lisp
(defun parse-ct-contents (x)
(let* ((records (cdr (elt (read-json-gzip-file x) 0)))
(record-size (length records)))
(dolist (x records)
(let* ((event-time (cdr-assoc :EVENT-TIME x))
(user-identity (cdr-assoc :USER-IDENTITY x))
(user-name (cdr-assoc :USER-NAME user-identity))
(user-key (cdr-assoc :ACCESS-KEY-ID user-identity))
;;(user-identity (cdr-assoc :ACCESS-KEY-ID (cdr-assoc :USER-IDENTITY x)))
(event-name (cdr-assoc :EVENT-NAME x))
View anonymous-gist.lisp
#+sbcl
(progn
(eval-when (:compile-toplevel)
(require :sb-sprof))
(sb-sprof:with-profiling (:report :flat) (do-bench)))
@ober
ober / ql-tools.lisp
Created Apr 26, 2016 — forked from bhyde/ql-tools.lisp
A few things for playing with quicklisp metadata. Note that this reveals assorted things that make life interesting; so use 'em in a clean discardable session. Probably ccl only.
View ql-tools.lisp
(in-package #:cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload "cl-ppcre")
(ql:quickload "optima")
(ql:quickload "optima.ppcre")
(use-package '#:optima)
(use-package '#:optima.ppcre))
(defun ensure-all-system-are-downloaded ()
@ober
ober / anonymous-gist.
Created Mar 30, 2016
vagrant not honoring -f
View anonymous-gist.
akkad|akkad|no-rvm:test-repo/git:akkad-vagrant-testing> vagrant -f destroy
default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
You can’t perform that action at this time.