Skip to content

Instantly share code, notes, and snippets.

View greyltc's full-sized avatar
💭
I may be slow to respond.

M. Greyson Christoforo greyltc

💭
I may be slow to respond.
View GitHub Profile
@greyltc
greyltc / mkcert.sh
Created June 6, 2017 13:16
make a certificate archive for plex media server from let's encript provided files
#!/usr/bin/env bash
# example usage: ./mkcert.sh plex.domain.com
DOMAIN_NAME=$1
openssl pkcs12 -export -in /etc/letsencrypt/live/$DOMAIN_NAME/fullchain.pem -inkey /etc/letsencrypt/live/$DOMAIN_NAME/privkey.pem -out /var/lib/plex/archive.pfx -name "$DOMAIN_NAME"
@greyltc
greyltc / with_NO_TBB_equals_0.build.log
Created March 11, 2017 13:54
bowtie2.3.1 build logs
==> Making package: bowtie2 2.3.1-1 (Sat Mar 11 13:46:32 GMT 2017)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found v2.3.1.tar.gz
==> Validating source files with md5sums...
v2.3.1.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Extracting v2.3.1.tar.gz with bsdtar
runtime:greyobject: checkmarks finds unexpected unmarked object obj=0xc42020de00
runtime: found obj at *(0xc42020e900+0x270)
base=0xc42020e900 k=0x6210107 s.base()=0xc42020e000 s.limit=0xc42020ff80 s.sizeclass=32 s.elemsize=1152
*(base+0) = 0xc4201db500
*(base+8) = 0x37b
*(base+16) = 0x37b
*(base+24) = 0xc4201db504
*(base+32) = 0x263
*(base+40) = 0x377
*(base+48) = 0xc4201db5fa
runtime: nelems=512 nfree=409 nalloc=103 previous allocCount=100 nfreed=65533
fatal error: sweep increased allocation count
runtime stack:
runtime.throw(0xc291ac, 0x20)
/usr/lib/go/src/runtime/panic.go:566 +0x95
runtime.(*mspan).sweep(0x7fb637391fb0, 0x7fb637391f01, 0x431301)
/usr/lib/go/src/runtime/mgcsweep.go:287 +0x7ab
runtime.(*mcentral).cacheSpan(0x1014790, 0x170000d670)
/usr/lib/go/src/runtime/mcentral.go:47 +0x491
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Fortran namelist parser. Converts nameslists to python dictionaries.
Should be fairly robust. Cannot be used for verifying fortran namelists as it
is rather forgiving.
Error messages during parsing are kind of messy right now.
@greyltc
greyltc / trace.log
Created February 23, 2017 11:36
kernel issue
Feb 23 11:33:03 carrot kernel: xhci_hcd 0000:0e:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 13
Feb 23 11:33:03 carrot kernel: xhci_hcd 0000:0e:00.0: Looking for event-dma 00000004a923d010 trb-start 00000004894e3fe0 trb-end 00000004894e3fe0 seg-start 00000004894e3000 seg-end 00000004894e3ff0
Feb 23 11:33:03 carrot kernel: xhci_hcd 0000:0e:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 13
Feb 23 11:33:03 carrot kernel: xhci_hcd 0000:0e:00.0: Looking for event-dma 00000004a923d020 trb-start 00000004894e3fe0 trb-end 00000004894e3fe0 seg-start 00000004894e3000 seg-end 00000004894e3ff0
Feb 23 11:33:03 carrot kernel: xhci_hcd 0000:0e:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 13
Feb 23 11:33:03 carrot kernel: xhci_hcd 0000:0e:00.0: Looking for event-dma 00000004a923d030 trb-start 00000004894e3fe0 trb-end 00000004894e3fe0 seg-start 00000004894e3000 seg-end 00000004894e3ff0
Feb 23 11:33:03 carrot kernel:
@greyltc
greyltc / aviToMkv.sh
Last active March 23, 2017 09:02
convert all *.avi in a folder to to .mkv
#!/usr/bin/env bash
# pacman -S mkvtoolnix-cli
for f in *.avi; do mkvmerge -o "${f/.avi/.mkv}" "${f}"; done
@greyltc
greyltc / bup.sh
Last active December 25, 2016 18:59
encrypted backup to google drive
#!/usr/bin/env bash
# my backup script
# always requires three arguments:
# $1 = "upload" or "recover"
# $2 = encryption key
# $3 = target directory
# ===upload mode===
# Requires ~/.drive folder that das already been setup
# target directory is an absolute path to a folder to be encrypted and uploaded
# Puts backup files into a folder #encfs/targetName in google drive
@greyltc
greyltc / vgaswitcherooNotes.md
Last active August 14, 2016 12:33
graphics switching notes for macbook pro 5.1

Requirements:

  1. zcat /proc/config.gz | grep SWITCHEROO must return CONFIG_VGA_SWITCHEROO=y
  2. Kernel modesetting must be on from boot
    To do this, add nouveau to the MODULES array in /etc/mkinitcpio.conf:
    MODULES="... nouveau ..."
    then regenerate the initial ramdisk:
    mkinitcpio -p linux

Now,

@greyltc
greyltc / changeLineSpeed.sh
Created August 8, 2016 11:18
bash script to change interface to 100baseTx given its mac address
#!/usr/bin/env bash
set -eu -o pipefail
# this is the mac address of the interface we're interested in
MAC_OI="20:47:47:f8:f4:71"
for i in /sys/class/net/* ; do
I_MAC=$(cat $i/address)
INTERFACE=$(basename $i/)
if [ "$MAC_OI" = "$I_MAC" ]; then