Skip to content

Instantly share code, notes, and snippets.

View tobert's full-sized avatar
💭
🏳️‍🌈 💻 🏳️‍🌈

Amy Tobey tobert

💭
🏳️‍🌈 💻 🏳️‍🌈
View GitHub Profile
Hi Al,
Happy Friday! I am an Oracle recruiter and would love to speak with you regarding a key position in our Global Data Services group...
We are designing and building a ground-breaking database cloud architecture that makes a set of globally distributed database shards appear to database clients as a single, highly available and scalable virtual database. This new architecture will optimize the performance of a wide variety of applications through intelligent utilization of globally distributed resources and by transparently routing client work requests to the proper shards. Pretty cool, huh?
I noticed you have been with DataStax for half a year. Wish I'd talk to you sooner! Would you like to hear more about this team? If yes, please suggest a few times that work for you early next week and a good number for me to call. Have a great weekend!
Regards,
recruiter
@tobert
tobert / main.go
Created March 7, 2014 22:54
Playing around with Gstreamer from Go
package main
import (
"fmt"
"github.com/tobert/glib"
"github.com/tobert/gst"
)
func main() {
fmt.Printf("Version %s\n", gst.VersionString())
@tobert
tobert / record.sh
Created March 8, 2014 06:34
four streams, one mpegts
#!/bin/bash
# pulsesrc ⇨ audioconvert ⇨ lamemp3enc
# ⇩
# queue
# ⇩
# queue ⇨ x264enc ⇨ queue ⇨ mpegtsmux ⇨ filesink
# ⇧
# ⇧ queue ⇦ jpegdec ⇦ jpegparse ⇦ v4l2src
# ⇧ ⇙
@tobert
tobert / showcam.sh
Created March 10, 2014 19:00
View a webcam with gstreamer
#!/bin/bash
set -e -x
gst-launch-1.0 \
v4l2src device=/dev/video0 ! \
image/jpeg, width=1280, height=720 ! \
jpegparse ! \
jpegdec ! \
autovideoconvert ! \
@tobert
tobert / 2cameras-2files.sh
Created March 10, 2014 19:34
2 cameras, 2 files
#!/bin/bash
set -e
timestamp=$(date -Im)
queue_bytes=$((2**24)) # 16mb queues between threads
camfile0="$HOME/Video/gst-video0-${timestamp}.mov"
camfile1="$HOME/Video/gst-video1-${timestamp}.mov"
camera_resolution="width=1280, height=720"
camera0="/dev/video0" # Logitech C920
@tobert
tobert / hack.txt
Created March 17, 2014 23:26
Unexpected success: Win7 image loopback on NTFS on LDM mounted on Linux
[atobey@brak ~]$ grep mnt /proc/mounts
/dev/mapper/ldm_vol_BRAK-Dg1_Volume1 /mnt/ldm fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0
/dev/loop0 /mnt/C fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0
@tobert
tobert / export-ovf.sh
Created March 20, 2014 22:14
OVF export of Cassandra VM using VBoxManage
VBoxManage export "Cassandra 2.0.6" -o Cassandra-2.0.6.ova --ovf10 --vsys 0 \
--product "Apache Cassandra" \
--producturl "http://planetcassandra.com" \
--vendor "Datastax" \
--vendorurl "http://www.datastax.com" \
--description "Cassandra on a Stick"
@tobert
tobert / gist:9754425
Created March 25, 2014 02:53
efi vfat on /boot
[root@sysresccd /]# mount /dev/sdd1 /boot -t vfat
[root@sysresccd /]# mount -t vfat
/dev/sdd1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii,shortname=mixed,errors=remount-ro)
@tobert
tobert / lvm-cheat.sh
Created March 25, 2014 03:05
Throw together a quick LVM config for dumping the device mapper table
#!/bin/bash
# create empty volume files
truncate --size 256M /a
truncate --size 256M /b
# attach them to loopback devices
deva=$(losetup --find)
losetup $deva /a
devb=$(losetup --find)
@tobert
tobert / gist:9755107
Last active August 29, 2015 13:57
efiboot setup session
[root@sysresccd /]# ls /boot
EFI initramfs-linux-fallback.img initramfs-linux.img vmlinuz-linux
[root@sysresccd /]# mv /boot /boot.bak
[root@sysresccd /]# mkdir /boot
[root@sysresccd /]# mkfs.vfat -n EFI -F32 /dev/mapper/efiboot
mkfs.fat 3.0.26 (2014-03-07)
unable to get drive geometry, using default 255/63
[root@sysresccd /]# mount /dev/mapper/efiboot /boot
[root@sysresccd /]# mount -t vfat
/dev/mapper/efiboot on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii,shortname=mixed,errors=remount-ro)