Skip to content

Instantly share code, notes, and snippets.

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
@pjobson
pjobson / nanopi_r1_pi_hole.md
Last active Nov 20, 2020
NanoPi R1 as Pi Hole Device
View nanopi_r1_pi_hole.md

NanoPi R1 as Pi Hole Device

This guide assumes you're using linux or some kind of OS with a shell, you can use Windows with some modifications.

Links

Install Latest Xenial

@pjobson
pjobson / hevc2avc.js
Created Nov 11, 2020
Convert hevc to avc (h.265 to h.264)
View hevc2avc.js
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const process = require('process');
const shellescape = require('shell-escape');
const child_process = require('child_process');
const cliProgress = require('cli-progress');
const FFMPEG = '/home/pjobson/bin/ffmpeg -hide_banner';
@pjobson
pjobson / avi2mp4.js
Created Nov 11, 2020
Convert AVI to MP4
View avi2mp4.js
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const process = require('process');
const shellescape = require('shell-escape');
const child_process = require('child_process');
const avi = process.argv[2];
const outpath = path.resolve(process.argv[3] || path.parse(avi).dir);
@pjobson
pjobson / sublime-text-prefs.json
Created Oct 8, 2020
Preferences for Sublime Text
View sublime-text-prefs.json
{
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_face": "Hack",
"font_size": 20.0,
"gutter": true,
"highlight_line": true,
"line_numbers": true,
"line_padding_bottom": 2,
"line_padding_top": 2,
View git-completion.bash
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
# *) local and remote tag names
@pjobson
pjobson / deluge_mods.user.js
Last active Sep 16, 2020
DelugeWeb Modficaitons UserScript
View deluge_mods.user.js
// ==UserScript==
// @name Deluge Modifications
// @namespace Violentmonkey Scripts
// @match http://localhost:8112/
// @grant none
// @version 1.0
// @author Paul Jobson <pjobson@gmail.com>
// @description Mods for DelugeWeb for streamlining the program. Adds: a default move to path, move path input focus, move path input enter key detection.
// ==/UserScript==
@pjobson
pjobson / clean.install.cli.tools.md
Last active Sep 11, 2020
Clean Install macOS Command Line Tools (CLI)
View clean.install.cli.tools.md

Homebrew

Homebrew on fresh macOS install.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Bash

Do with care, this installs and sets your shell to bash 5.x instead of the default 3.x.

@pjobson
pjobson / install_pgModeler.md
Last active Sep 2, 2020
Install pgModeler Mint/Ubuntu
View install_pgModeler.md

Install pgModeler

Not a QT expert? Need to get pgModeler installed and getting tons of errors?

Secret Dependencies are Secret

Not that we needed all that for the trip, but once you get locked into a serious library collection, the tendency is to push it as far as you can.

Seriously I have no idea if you need all of this stuff or not, this is what I installed / have installed and it works.

@pjobson
pjobson / sublfind.sh
Created Aug 25, 2020
Script for Finding a File and Opening with Sublime
View sublfind.sh
#!/bin/bash
INPUT=$1
IFS=":"
read -ra FILE <<< "$INPUT"
FIND=`/usr/bin/find . -name ${FILE[0]}`
LINE=${FILE[1]}
`/usr/bin/subl ${FIND}:${LINE}`
View npm-completion.bash
#!/usr/bin/env bash
# npm (Node Package Manager) completion
# https://docs.npmjs.com/cli/completion
if command -v npm &>/dev/null
then
eval "$(npm completion)"
fi
You can’t perform that action at this time.