Skip to content

Instantly share code, notes, and snippets.

@priyadarshan
priyadarshan / OmniOS-argo-diskinfo.md
Last active May 29, 2018 14:26
OmniOS on argo: diskinfo (LSI Logic / Symbios Logic SAS3008 PCI-Express Fusion-MPT SAS-3, mpt_sas driver)

LSI Logic / Symbios Logic SAS3008 PCI-Express Fusion-MPT SAS-3, mpt_sas driver

priyadarshan@omniosce:~# diskinfo
TYPE    DISK                    VID      PID              SIZE          RMV SSD
SCSI    c0t50014EE26192FCEEd0   ATA      WDC WD60EFRX-68M 5589.03 GiB   no  no
SCSI    c0t50014EE20CD2B1EEd0   ATA      WDC WD60EFRX-68L 5589.03 GiB   no  no
SCSI    c0t50014EE2622A87C8d0   ATA      WDC WD60EFRX-68L 5589.03 GiB   no  no
SCSI    c0t50014EE2B679C4B8d0   ATA      WDC WD60EFRX-68T 5589.03 GiB   no  no
SCSI    c0t5000CCA26BD59F6Dd0   ATA      WDC WD100EFAX-68 9314.00 GiB   no  no
@priyadarshan
priyadarshan / omniOS-argo.md
Last active May 29, 2018 14:10
OmniOS on argo (Asus X399 motherboard, Ryzen Threadripper 1950X)
priyadarshan@omniosce:~# prtconf -Dd
System Configuration:  System manufacturer  i86pc
Memory size: 65411 Megabytes
System Peripherals (Software Nodes):

i86pc (driver name: rootnex)
    scsi_vhci, instance #0 (driver name: scsi_vhci)
        disk, instance #0 (driver name: sd)
        disk, instance #1 (driver name: sd)
@priyadarshan
priyadarshan / cl-udpip.lisp
Created April 29, 2018 10:09 — forked from shortsightedsid/cl-udpip.lisp
Short guide to UDP/IP Client/Server programming in Common Lisp using usockets
; Short guide to UDP/IP Client/Server programming in Common Lisp using usockets
;
; The main reason for this guide is because there are very few examples that
; explain how to get started with socket programming with Common Lisp that I
; could understand.
; After working on a short example on TCP, I found the
; need for a UDP tutorial. So, here goes.
; As usual, we will use quicklisp to load usocket.
@priyadarshan
priyadarshan / cl-tcpip.lisp
Created April 29, 2018 10:08 — forked from shortsightedsid/cl-tcpip.lisp
Short guide to TCP/IP Client/Server programming in Common Lisp using usockets
; Short guide to TCP/IP Client/Server programming in Common Lisp using usockets
;
; The main reason for this guide is because there are very few examples that
; explain how to get started with socket programming with Common Lisp that I
; could understand. After spending a day trying, I finally came up with a small
; bit of code that makes it easy to understand the basics. I've written this
; primarily for myself, but should help others get started as well.
; As usual, we will use quicklisp to load usocket.
@priyadarshan
priyadarshan / ql-gitify.lisp
Created March 31, 2018 07:19 — forked from death/ql-gitify.lisp
Facilitate creating Git repositories for third-party Quicklisp projects.
(defpackage #:snippets/ql-gitify
(:documentation
"Facilitate creating Git repositories for third-party Quicklisp
projects.")
(:use #:cl)
(:import-from #:constantia #:out #:print-table)
(:import-from #:split-sequence #:split-sequence)
(:import-from #:alexandria #:starts-with-subseq #:hash-table-plist)
(:import-from #:ql #:qmerge)
(:export
@priyadarshan
priyadarshan / fido-dmesg.txt
Created March 19, 2018 08:56
fido first dmesg - verbose
root@fido:~ # dmesg
AMD ext features: 0x00040007
AMD elvt0: 0x00010000
AMD elvt1: 0x00010000
AMD elvt2: 0x00010000
AMD elvt3: 0x00010000
SMP: AP CPU #4 Launched!
cpu4 AP:
ID: 0x04000000 VER: 0x80050010 LDR: 0x00000000 DFR: 0xffffffff
lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff
@priyadarshan
priyadarshan / 1VPS benchmarks
Last active February 8, 2018 14:36
FreeBSD on Do and Vultr
Some VPS benchmarks
@priyadarshan
priyadarshan / fido-dmesg.txt
Created February 7, 2018 08:49
Fido II first DMESG
root@fido:~ # dmesg
Copyright (c) 1992-2017 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017
[email protected]:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
VT(efifb): resolution 1280x1024
CPU: AMD Ryzen Threadripper 1950X 16-Core Processor (3393.71-MHz K8-class CPU)
@priyadarshan
priyadarshan / 1
Last active February 7, 2018 08:50
1
root@fido:~ # dmesg
Copyright (c) 1992-2017 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017
[email protected]:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
VT(efifb): resolution 1280x1024
CPU: AMD Ryzen Threadripper 1950X 16-Core Processor (3393.71-MHz K8-class CPU)
@priyadarshan
priyadarshan / cl-sql.org
Last active January 23, 2018 16:23
cl-sql notes

Source: https://www.reddit.com/r/Common_Lisp/comments/7s53qi/what_do_you_recommend_to_work_with_sql_databases/dt2oeiu/

I’m no master and my snippets are in spanish, but basically… This is what you can do as quick examples of a way of using it, assuming you have loaded clsql and you have a connection to the db.

What you can do, that is, the pattern I suggest, is the following. For example you need to generate a SELECT statement for a specific purpose. You can define a macro like this (let’s suppose your select only needs to select for a specific column on a specific table):

(defmacro sql-select-document-numbers (&optional args)
 `(sql-operation 'select
                 (col :doc-num :ld)