Skip to content

Instantly share code, notes, and snippets.

Priyadarshan priyadarshan

Block or report user

Report or block priyadarshan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@priyadarshan
priyadarshan / lambda.txt
Created Jul 11, 2019
lambda.txt -- the ultimate fortune file
View lambda.txt
This is the file LAMBDA.TXT, version 11.
Last Edit: 2005-Sep-13
To install on systems using BSD fortune(6), rename this file "lambda" and
store it in the appropriate fortunes directory, usually /usr/games/fortune
or /usr/share/fortune or something like that. Then in that directory run
strfile(8) on the "lambda" file which should produce a "lambda.dat". To
test, go to some other directory with no file called "lambda" in it, and
say "fortune lambda". If you get a lispy fortune you win. If not you lose.
To install on other systems simply find a fortune program, install it, and
@priyadarshan
priyadarshan / slow.lisp
Created May 20, 2019 — forked from j3pic/slow.lisp
Program to test the performance of Lisp file I/O.
View slow.lisp
;; It is often said that Lisp macros need not be used for optimization purposes. This
;; is an exception. SBCL issued the following warning when compiling the MAKE-ARRAY call
;; below:
;; ; note: unable to optimize because: ELEMENT-TYPE is not constant.
;; I don't want to lose the ability to decide which ELEMENT-TYPE to use by using
;; an :ELEMENT-TYPE argument, so I have to arrange for this argument to be processed
;; at compile time.
@priyadarshan
priyadarshan / plex-on-omnios-r151028-lx-zone.md
Last active May 30, 2019
Install Plex on OmniOS r151028 via lx zone
View plex-on-omnios-r151028-lx-zone.md
@priyadarshan
priyadarshan / csplit.txt
Created Sep 28, 2018 — forked from budparr/csplit.txt
Terminal command to split a list of markdown items into separate documents. Given a "slug" value, the file will be named that. You could also change slug to title and create slugs/filenames from the title. You may also want to run your output through a markdown converter, like https://github.com/domchristie/to-markdown
View csplit.txt
csplit -k -n 3 export.txt '/^@@@/' {'999'}; for i in xx*; do sed -i '' 's/@@@/---/g' $i; done; for i in xx*; do mv $i `egrep -m1 -e 'slug:.*' $i | sed -e s/[^\]\[A-Za-z0-9~.,_{}\(\)\'\-\+]/-/g -e s/slug--//`.md; done
@priyadarshan
priyadarshan / illumos-wipe-disk.sh
Last active Sep 7, 2018
illumos/OmniOS - Wipe disks in order to re-use them from previous zpool
View illumos-wipe-disk.sh
#!/usr/bin/ksh93
# This script only wipe same-sized disks for now
SIZE="10000831348736"
LAST_PART=`echo "($SIZE / 1024 / 1024) - 10" | /usr/bin/bc`
# List of disks to wipe
DRIVES="c0t5000CCA26BD0CAFAd0p0 c0t5000CCA26BD116ACd0p0 c0t5000CCA26BD59F6Dd0p0 c0t5000CCA26BD5AAC5d0p0
c0t5000CCA26BD6960Ed0p0 c0t5000CCA26BD6B9CCd0p0 c0t5000CCA26BD6C6D4d0p0 c0t5000CCA26BD6E59Cd0p0"
View lobsters-mastodon.lisp
(ql:quickload :drakma)
(ql:quickload :cl-json)
(ql:quickload :plump)
(ql:quickload :babel)
(ql:quickload :tooter)
(ql:quickload :split-sequence)
(defvar *feed-path* "https://lobste.rs/rss")
(setf drakma:*drakma-default-external-format* :UTF-8)
@priyadarshan
priyadarshan / swap-cmd-ctrl.json
Created Jun 26, 2018
Karabiner: Swap command and control: LispWorks and terminals
View swap-cmd-ctrl.json
{
"title": "Swap command and control: LispWorks and terminals",
"rules": [
{
"description": "Swap command and control",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_control",
@priyadarshan
priyadarshan / OmniOS-argo-diskinfo.md
Last active May 29, 2018
OmniOS on argo: diskinfo (LSI Logic / Symbios Logic SAS3008 PCI-Express Fusion-MPT SAS-3, mpt_sas driver)
View OmniOS-argo-diskinfo.md

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
OmniOS on argo (Asus X399 motherboard, Ryzen Threadripper 1950X)
View omniOS-argo.md
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)
You can’t perform that action at this time.