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
@pjobson
pjobson / thinkpad_t495_fingerprint_linux.md
Created August 30, 2023 19:52
Enable Fingerprint Reader in Ubuntu Linux Variants

Enable T495 Fingerprint Reader in Ubuntu Variants

I'm currently on Mint 21.2 testing on a ThinkPad T495.

This pertains to any laptop with a Synaptics Prometheus MIS Touch Fingerprint Reader.

sudo apt install -y fprintd libpam-fprintd
sudo pam-auth-update

The edit common auth.

#!/usr/bin/env node
// Script for converting hevc to avc (h265 to h264)
const fs = require('fs');
const os = require('os');
const path = require('path');
const process = require('process');
const shellescape = require('shell-escape');
const child_process = require('child_process');
#!/usr/bin/env node
// Script for extracting all files from an MKV container.
const fs = require('fs');
const path = require('path');
const process = require('process');
const shellescape = require('shell-escape');
const child_process = require('child_process');
@pjobson
pjobson / chonkyrc
Last active April 15, 2023 20:07
chonky rc
conky.config = {
alignment = 'top_right',
background = true,
border_inner_margin = 0,
border_outer_margin = 0,
border_width = 10,
cpu_avg_samples = 100,
display = 1,
double_buffer = true,
draw_borders = false,
@pjobson
pjobson / cavm.md
Last active January 20, 2023 00:52
Clam AV Mac

Download/install from: https://www.clamav.net/downloads

Open terminal

One time:

sudo cp /usr/local/clamav/etc/freshclam.conf.sample /usr/local/clamav/etc/freshclam.conf
sudo /usr/bin/sed -i '' 's/Example/# Example/' /usr/local/clamav/etc/freshclam.conf
sudo cp /usr/local/clamav/etc/clamd.conf.sample /usr/local/clamav/etc/clamd.conf

sudo /usr/bin/sed -i '' 's/Example/# Example/' /usr/local/clamav/etc/clamd.conf

@pjobson
pjobson / openhab_notes.md
Last active April 4, 2024 07:42
OpenHAB on Low Power Hardware

OpenHAB on Low Power Hardware

Geared towards running on Dell Wyse 3040 ATOM CPU devices with antiX Linux with Nortek GoControl HUSBZB-1 Z-Wave and Zigbee.

The Wyse 3040 is a very basic 4 core 1.44GHz/1.92GHz (burst) Intel Atom x5-Z8350 with 2GB of RAM. Supposedly they average about 7.5 watts under normal load. They can be purchased for $35-100 on eBay (as of 2 Jan 2023). CPUMark on mine is 1,050, which is about 138 points higher than average.

Install antiX

I chose antiX as it is geared for low-end computers and it does not come with much installed on it.

@pjobson
pjobson / wan_ssh
Created December 11, 2022 06:16 — forked from lynus/wan_ssh
openwrt:allow wan ssh into your wrt
by default,openwrt do not allow ssh access from wan, here are two method to change that:
1.login into your wrt from a lan host.issue the following command:
iptables -F
the command "flush away" all the firewall rules,including the one that rejects ssh request from wan.
now you can try ssh from anywhere.
aware that the firewall deactivation leads to highly security risk.and after the wrt restarts ,all default firewall configuration comes back.you hava to "flush" the rules once again.
{
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_face": "Hack",
"font_size": 28.0,
"gutter": true,
"highlight_line": true,
"ignored_packages":
[
"Vintage",
[
{
"keys": ["super+shift+r"],
"command": "show_panel",
"args": {
"panel": "replace",
"reverse": false
}
},
{
# Shows git branch at prompt.
# add to ~/.bashrc or ~/.bash_profile
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "