Skip to content

Instantly share code, notes, and snippets.

@abrasive
abrasive / nvme-target-client.sh
Last active April 3, 2024 01:58
Set up a laptop as NVMe-over-fabric target in initramfs
#!/bin/sh
# This imports the nvme device exported by the nvme-target-mode.sh script
set -e
sudo modprobe nvme-fabrics
sudo ifconfig thunderbolt0 10.99.1.1 netmask 255.255.255.0 up
sudo nvme connect -t tcp -a 10.99.1.2 -n mylaptopname -s 4420
@abrasive
abrasive / mscdex.txt
Created January 19, 2020 22:52
mscdex
Subject: Microsoft MS-DOS CD-ROM Extensions 2.1
Product Overview Version 2.10 Beta
The Microsoft MS-DOS CD-ROM Extensions are an extension to the MS-DOS
operating system which permit reading CD-ROM disks which conform to both the
High Sierra May 28th format and the ISO-9660 version of the High Sierra
format. The CD-ROM disc appears just like a magnetic disk to the user and to
applications software, ensuring compatibility with current software.
Microsoft, as creator of the MS-DOS operating system, is able to ensure

Keybase proof

I hereby claim:

  • I am abrasive on github.
  • I am abrasive (https://keybase.io/abrasive) on keybase.
  • I have a public key ASAGbeGf_2etCQBksNiIAuutVyJ4m9NbgiAtFdqRrZkIDgo

To claim this, I am signing this object:

/* Reproduce incorrect lseek(fd, 0, SEEK_DATA) results on freshly written files. */
#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
@abrasive
abrasive / zfs_test_null.py
Created May 26, 2019 14:36
zfs_test_null.py
#!/usr/bin/env python3
from portage.util.file_copy import _optimized_copyfile
import shutil
import sys
import os
import secrets
import random
import pathlib
https://ibpm.cisco.com/gssc/rmain/login/msLY7o3HC3Jk7RAQfn7N4UB1CIC-G--P*/webwb/ARExternalPic.jpg
npm info it worked if it ends with ok
npm info using npm@4.2.0
npm info using node@v7.8.0
npm info attempt registry request try #1 at 12:32:14 AM
npm http request GET https://registry.npmjs.org/archiver
npm info attempt registry request try #1 at 12:32:14 AM
npm http request GET https://registry.npmjs.org/async
npm info attempt registry request try #1 at 12:32:14 AM
npm http request GET https://registry.npmjs.org/basic-auth
npm info attempt registry request try #1 at 12:32:14 AM
Enter a short description of your email. View this message online
Good morning, guys!
We noticed that you are interested in gui client for redis database.We have offer for you, may be you will be interested in our project. Here is the link
FastoRedis . We offer modern powerful and comfortable decision. FastoRedis is better for developers because we are able to work with clusters , better for
admins , better for managers .
We have more than 10 000 users and good offers for companies.
So we will be glad to hear your feedback. Thank you for your time reading this email. Download
@abrasive
abrasive / flow.py
Created May 16, 2016 23:52
goto has its place
# Find which column (if any) has doc IDs in it
for col in range(len(headers)):
for val in sheet.col_values(col, start_rowx=1):
if not isinstance(val, str):
continue
if doc_id_regex.search(val):
break
else:
continue
string FixText(string src)
{
// problem : printf is causing an error if a value contains the char '%' (e.g. 10k/1%)
// solution : '%' is substituted with '_'
string tarray[];
strsplit(tarray,src,'%');
return strjoin(tarray,'_');
}