Skip to content

Instantly share code, notes, and snippets.

View pjobson's full-sized avatar
:shipit:
p̰͍͖̄̀ͬ̒̎̅a̲͚̯̱̺͗̿̓̆͊̀͌ǘ̳̹͙͔̘̈ͭ̋̒ͭ̋lͫ̔ͯ̂ ͎͖͍̤ͣͧ̀ͨj̾o̹̗͍̲̽ͥ́̊͐b̪ͬͪͫ̂s̙̫͕̼̭͛̍̔on̽

Paul Jobson pjobson

:shipit:
p̰͍͖̄̀ͬ̒̎̅a̲͚̯̱̺͗̿̓̆͊̀͌ǘ̳̹͙͔̘̈ͭ̋̒ͭ̋lͫ̔ͯ̂ ͎͖͍̤ͣͧ̀ͨj̾o̹̗͍̲̽ͥ́̊͐b̪ͬͪͫ̂s̙̫͕̼̭͛̍̔on̽
View GitHub Profile
(function(global){
"use strict";
function constEnumPropValueDesc(v){
return {
value: v,
enumerable: true,
configurable: false,
writable: false
};
@pjobson
pjobson / how-to-generate-and-use-private-keys-with-openssl-tool.md
Created March 6, 2018 21:56 — forked from briansmith/how-to-generate-and-use-private-keys-with-openssl-tool.md
How to generate & use private keys using the OpenSSL command line tool

How to Generate & Use Private Keys using OpenSSL's Command Line Tool

These commands generate and use private keys in unencrypted binary (not Base64 “PEM”) PKCS#8 format. The PKCS#8 format is used here because it is the most interoperable format when dealing with software that isn't based on OpenSSL.

OpenSSL has a variety of commands that can be used to operate on private key files, some of which are specific to RSA (e.g. openssl rsa and openssl genrsa) or which have other limitations. Here we always use

@pjobson
pjobson / bash-colors.md
Created April 19, 2018 15:20 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
Constant Wrapper function Codec_ID Extension Extension alt. Python dict
MKV_A_AC3 xtr_base_c(new_codec_id, new_tid, tspec,"Dolby Digital (AC-3)"); A_AC3 ac3 'A_AC3': 'ac3'
MKV_A_EAC3 xtr_base_c(new_codec_id, new_tid, tspec,"Dolby Digital Plus (E-AC-3)"); A_EAC3 eac3 'A_EAC3': 'eac3'
A_MPEG/L* xtr_base_c(new_codec_id, new_tid, tspec,"MPEG-1 Audio Layer 2/3"); A_MPEG/L2 mp2 'A_MPEG/L2': 'mp2'
A_MPEG/L3 mp3 'A_MPEG/L3': 'mp3'
MKV_A_DTS xtr_base_c(new_codec_id, new_tid, tspec,"Digital Theater System (DTS)"); A_DTS dts 'A_DTS': 'dts'
MKV_A_PCM xtr_wav_c(new_codec_id, new_tid, tspec); A_PCM/INT/LIT wav 'A_PCM/INT/LIT': 'wav'
MKV_A_PCM_BE xtr_wav_c(new_codec_id, new_tid, tspec); A_PCM/INT/BIG wav 'A_PCM/INT/BIG': 'wav'
MKV_A_FLAC xtr_flac_c(new_codec_id, new_tid, tspec); A_FLAC flac ogg 'A_FLAC': 'flac'
MKV_A_ALAC xtr_alac_c(new_codec_id, new_tid, tspec); A_ALAC caf m4a 'A_ALAC': 'caf'
@pjobson
pjobson / _verify-repair-permissions-disk.md
Created September 21, 2018 01:01 — forked from bzerangue/_verify-repair-permissions-disk.md
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@pjobson
pjobson / clean-up-boot-partition-ubuntu.md
Created September 23, 2018 17:55 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@pjobson
pjobson / force-scrollbars-visible.css
Created January 8, 2019 18:22 — forked from IceCreamYou/force-scrollbars-visible.css
Mac OS X hides scrollbars by default. This is annoying for UI design because it means users might not realize that certain areas are scrollable. This public domain Gist forces the scrollbar to always be visible with native behavior in Webkit-based browsers (Chrome and Opera) on Macs.
.force-show-scrollbars ::-webkit-scrollbar-track:vertical {
border-left: 1px solid #E7E7E7;
box-shadow: 1px 0 1px 0 #F6F6F6 inset, -1px 0 1px 0 #F6F6F6 inset;
}
.force-show-scrollbars ::-webkit-scrollbar-track:horizontal {
border-top: 1px solid #E7E7E7;
box-shadow: 0 1px 1px 0 #F6F6F6 inset, 0 -1px 1px 0 #F6F6F6 inset;
}
for f in /usr/share/figlet/*
do
fs=$(basename $f)
fname=${fs%%.tlf}
toilet -f $fname $fname
done
@pjobson
pjobson / vaapi-ffmpeg-build.md
Created March 11, 2021 22:58
Building a VAAPI enabled FFmpeg for use bound to the !/bin prefix

Build FFmpeg and libva with decode and encode hardware acceleration on an Intel-based validation testbed:

Build platform: Ubuntu

Install baseline dependencies first

sudo apt-get -y install autoconf automake build-essential libass-dev libtool pkg-config texinfo zlib1g-dev libva-dev cmake mercurial libdrm-dev libvorbis-dev libogg-dev git libx11-dev libperl-dev libpciaccess-dev libpciaccess0 xorg-dev

Then add the Oibaf PPA, needed to install the latest development headers for libva:

@pjobson
pjobson / diskripper.sh
Last active May 3, 2022 18:30 — forked from tacofumi/diskripper.sh
This script rips DVD/Blu-ray using makemkvcon. Use udev to invoke this script to auto-rip when disk is inserted. Some variables such as length of string to trim in order to get the title of movie may vary depending on your environment.
#!/bin/bash
# heavily derived from: https://gist.github.com/tacofumi/3041eac2f59da7a775c6
# I mainly simplifed the title generation and made it automatically create a path
echo $(date)
title=$(makemkvcon -r info |grep "DRV:0" | sed -E 's/.+,"(.+)","\/dev\/.+"$/\1/')
if [[ -z $title ]]; then
echo "Couldn't set the title - No disk found"