Skip to content

Instantly share code, notes, and snippets.

View jackwasey's full-sized avatar

Jack Wasey jackwasey

  • Children's Hospital of Philadelphia
  • Pennsylvania, USA
View GitHub Profile
@jackwasey
jackwasey / a2dp.py
Created May 17, 2021 16:27 — forked from pylover/a2dp.py
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3.5
"""
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04 and also debian jessie, with bluez5.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
@jackwasey
jackwasey / compile-ffmpeg-nvenc.sh
Created May 19, 2021 17:51
This bash script will compile a static Ffmpeg build with NVENC and VAAPI hardware-accelerated support on Ubuntu in your home directory. You can modify the script to customize the build options as you see fit.
#!/bin/bash
#This script will compile and install a static ffmpeg build with support for nvenc un ubuntu.
#See the prefix path and compile options if edits are needed to suit your needs.
#install required things from apt
installLibs(){
echo "Installing prerequisites"
sudo apt-get update
sudo apt-get -y --force-yes install autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev \
@jackwasey
jackwasey / web-servers.md
Created May 19, 2021 21:32 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@jackwasey
jackwasey / ANSI.md
Created August 8, 2021 10:30 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1b
  • Decimal: 27
@jackwasey
jackwasey / Public_Time_Servers.md
Created April 5, 2022 23:32 — forked from mutin-sa/Top_Public_Time_Servers.md
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@jackwasey
jackwasey / zfs_mount.c
Created July 3, 2022 17:20 — forked from khenriks/zfs_mount.c
Auxiliary mount helper for non-root ZFS mounts
// Compile with:
// cc -DUID=$UID -DUSER=$USER -D_LARGEFILE64_SOURCE -o zfs_mount zfs_mount.c `pkg-config --cflags --libs libzfs`
// then install with:
// sudo cp zfs_mount /usr/local/bin
// sudo setcap cap_sys_admin+ep /usr/local/bin/zfs_mount
#include <libzfs.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>