Skip to content

Instantly share code, notes, and snippets.

View diskchecker.pl
#!/usr/bin/perl
#
# Brad's el-ghetto do-our-storage-stacks-lie?-script
#
sub usage {
die <<'END';
Usage: diskchecker.pl -s <server[:port]> verify <file>
diskchecker.pl -s <server[:port]> create <file> <size_in_MB>
diskchecker.pl -l [port]
View Instructions
1. Execute make first. This will result in a netlinkKernel.ko output among many others.
2. Execute $ gcc netlinkUser.c -o netlinkUser
3. Insert kernel module by :$ sudo insmod netlinkKernel.ko
4. Run ./netlinkUser to see message and run dmesg to see debug messages
5. Remove module by : $ sudo rmmod netlinkKernel
6. Finally make clean to remove output files.
@slowfranklin
slowfranklin / soft-iwarp.adoc
Created Jun 3, 2016 — forked from jasonbrooks/soft-iwarp.adoc
Toward a method of testing Gluster RDMA with regular ethernet NICs, for the hardware-challenged. For now, I have the installing soft-iwarp on Fedora 18 part down (I think). Up next, the getting it to work with Gluster RDMA part...
View soft-iwarp.adoc

Testing Gluster RDMA with Soft-iWARP

There’s a Gluster 3.4 RDMA test day right around the corner, and I want to join in on the fun. The trouble is, I don’t have any RDMA-capable hardware in my lab right now. Undaunted, I hit the Web in search of a software-based solution, one that would at least allow me to run through the tests.

I found a pair of promising-looking options:

The information out on the web about these projects is a bit thinner than I’d like, but I found a blog post howto on installing Soft-iWARP on Ubuntu 10.10 and another for Debian 6 and figured I’d try it out on Fedora 18.

View 01tdb
Using https://github.com/hyc/leveldb/commit/0cbfeaa4caa6f6615c0a0caf611e4cdff909465d
Had to revert the TDB_MUTEX_LOCKING code since that doesn't support transactions, and all of the other tests are transactional.
./db_bench_tdb --stats_interval=100000 --benchmarks=fillseqbatch --new_hash=1
TDB: version 1.3.0
Date: Tue Sep 16 02:56:01 2014
CPU: 4 * Intel(R) Core(TM)2 Extreme CPU Q9300 @ 2.53GHz
CPUCache: 6144 KB
Keys: 16 bytes each
@slowfranklin
slowfranklin / Portfile
Last active Aug 29, 2015
Samba 4.1.12 Portfile and Patches
View Portfile
# $Id: Portfile 120565 2014-06-01 16:53:49Z cal@macports.org $
PortSystem 1.0
name samba4
version 4.1.12
revision 2
categories net
platforms darwin
maintainers mww
View idstrings.pl
#!/usr/bin/perl -w
# source: https://forums.adobe.com/message/3706123#3706123
#
use strict;
$/=undef;
if ($#ARGV < 1) {
die "idstrings INFILE ... OUTFILE";
View README.md

slow

This bash script offers quick shortcuts to simulate slower network connections. It is useful when you need to simulate a wireless network on a Linux network server, especially when you are using a virtual machine guest on your local machine or in the cloud.

slow 3G                   # Slow network on default eth0 down to 3G wireless speeds
slow reset                # Reset connection for default eth0 to normal
slow vsat --latency=500ms # Simulate satellite internet  with a high latency
slow dsl -b 1mbps         # Simulate DSL with a slower speed than the default
slow modem-56k -d eth0    # Simulate a 56k modem on the eth1 device. eth0 is unchanged.
View mavericks.bootable.iso.sh
#!/bin/sh
# Original: http://thezinx.com/2013/10/29/create-bootable-dmg-iso-mavericks-app.html
V_BUILD=/Volumes/install_build
V_APP=/Volumes/install_app
T_SI_B=/tmp/mavericks
T_SI=$T_SI_B.sparseimage
View source-tracker-samba
INSTALLDIR=/some/dir
TRACKER_DIR="$INSTALLDIR/var/tracker"
export HOME="$TRACKER_DIR"
export DBUS_SESSION_BUS_ADDRESS="unix:path=$INSTALLDIR/var/run/spotlight.ipc"
View gist:d97aaf4b11febb187793
[global]
...
rpc_server:mdssvc = embedded
...
[share]
...
spotlight = yes
...