Skip to content

Instantly share code, notes, and snippets.

Tmux
GPG
etc
@jtexp
jtexp / gist:4e8fc6798ddc29cf2210
Created March 25, 2015 07:20
Hyper-V Config Notes
video=hyperv_fb:640x480
@jtexp
jtexp / workflow
Created April 2, 2015 18:49
Git Workflow notes
git merge --strategy=ours master
git checkout master
git merge $branch
@jtexp
jtexp / rtunnel.servbice
Created July 8, 2015 21:31
SSH Tunnel Notes
[Unit]
Description=Reverse SSH Tunnel
[Service]
ExecStart=/bin/ssh -p 51988 -o StrictHostKeyChecking=no -i /etc/ssh/key -Nxn2TR 50555:127.0.0.1:22 user@server.ip
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
@jtexp
jtexp / rackconfig
Created July 12, 2015 00:41
storage - rack - configuration
TS140 w/ i3 mainboard
2 x 4 gb ecc
8x3TB WD Red
1x128gb SSD
LSI 9211-8i flashed to IT mode.
1. Get sas2flash.efi, current IT firmware and current BIOS from LSI web site
2. Put those on ordinary USB flash drive, and plug USB flash drive into computer
3. Do not boot from flash drive, but select UEFI boot from boot selector, which is f11 on SuperMicros
4. Select USB drive; type "map" in UEFI boot to show drives; mine was fs0, so I typed "fs0:" at UEFI prompt
@jtexp
jtexp / ssh
Created July 24, 2015 22:45
ssh tricks
~/.ssh/config
Host $name
Hostname .
Port #
IdentityFile .
ServerAliveInterval (s)
ServerAliveCountMax #
@jtexp
jtexp / gist:4b37a8f52faeb3dbd124
Created August 6, 2015 00:38
Moving Home to new drive on Fedora with LVM.
mount /dev/sdb1 /disk2
rsync -aAXv /home/ /disk2
systemctl isolate rescue.target
edit fstab, add entry for new disk, comment old entry
reboot
check make sure new home directory exists, delete old mount point
lvs to show LVM info
lvremove fedora/home
lvresize -L +xxg fedora/root
resize2fs /dev/mapper/root
@jtexp
jtexp / gist:0a797496fd4b3bfdc741
Created August 22, 2015 22:51
openssl rand stream
sudo openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt </dev/zero | pv --progress --eta --rate --bytes --size 8000632782848 | dd of=/mnt/st/file.test bs=10M
@jtexp
jtexp / gist:84864a1c3987238eaefd
Created August 22, 2015 23:02
seagate 8tb failure
[ 1670.020298] sdc: sdc1
[ 1671.456883] sdc: sdc1
[ 2326.627882] EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts: (null)
[ 2714.601332] ata4.00: exception Emask 0x0 SAct 0x3fffff00 SErr 0x0 action 0x6 frozen
[ 2714.604495] ata4.00: failed command: WRITE FPDMA QUEUED
[ 2714.607081] ata4.00: cmd 61/c0:40:80:fc:90/3a:00:03:00:00/40 tag 8 ncq 7700480 out
res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 2714.613744] ata4.00: status: { DRDY }
[ 2714.615457] ata4.00: failed command: WRITE FPDMA QUEUED
[ 2714.617773] ata4.00: cmd 61/00:48:40:37:91/16:00:03:00:00/40 tag 9 ncq 2883584 out
@jtexp
jtexp / gist:4985bbc06b465b0d90d7
Created September 10, 2015 05:26
bs2b crossfeed on gst-1.4.5
change
./configure
GST_REQ=1.4.5
GSTPB_REQ=1.4.5
cd ./ext/bs2b
make
cd ./.libs/
mv bs2b .so to .. /lib64/gstreamer-1.0