Skip to content

Instantly share code, notes, and snippets.

View yankee14's full-sized avatar

Ed Peguillan III yankee14

  • Senior Electrical and Software Engineer @ Altaeros
  • Fremont, NH
View GitHub Profile
@yankee14
yankee14 / transcode_for_ps4.py
Last active March 21, 2021 07:48
Transcodes video to a format playable by PlayStation 4's media player app
#!/usr/bin/python3
"""
Put this script in the directory containing your PS4-unsupported *.mkv files, and run it.
"""
__author__ = "Ed Peguillan III"
__version__ = "0a1"
__license__ = "Apache 2.0"
import ffmpeg
@yankee14
yankee14 / paste.example
Created June 15, 2020 15:47
to paste..
F4 "~" 0 0 50 H I C CNN "Manufacturer 1"
F5 "~" 0 0 50 H I C CNN "MPN 1"
F6 "~" 0 0 50 H I C CNN "Type"
F7 "~" 0 0 50 H I C CNN "Max Reverse Voltage"
F8 "~" 0 0 50 H I C CNN "Max Average Current"
F9 "~" 0 0 50 H I C CNN "Max Power"
F10 "~" 0 0 50 H I C CNN "Forward Voltage"
F11 "~" 0 0 50 H I C CNN "Zener Voltage"
F12 "~" 0 0 50 H I C CNN "Tolerance"
F13 "~" 0 0 50 H I C CNN "Reverse Leakage Current"
@yankee14
yankee14 / Diode.lib
Created June 15, 2020 15:43
File snippet
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# 1.5KExxA
#
DEF 1.5KExxA D 0 40 N N 1 F N
F0 "D" 0 100 50 H V C CNN
F1 "1.5KExxA" 0 -100 50 H V C CNN
F2 "Diode_THT:D_DO-201AE_P15.24mm_Horizontal" 0 -200 50 H I C CNN
F3 "" -50 0 50 H I C CNN
# set mouse explicitly off by default
set-option -g mouse on
# set term theme
set -g default-terminal "screen-256color"
set -g @themepack 'powerline/double/blue'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
@yankee14
yankee14 / collate.sh
Created May 10, 2020 21:51
Collate pages from stupid scanner
#!/bin/bash
# Ed Peguillan III
# yankee14@protonmail.com
for page in {1..20}; do
printf -- "On page ${page}\n"
# fronts of pages
renum=$(printf "%02d" ${page}) # leading zero pad
renaming="uncollated-${renum}.png" # file to rename
@yankee14
yankee14 / test.FCStd
Last active May 2, 2020 22:59
Martham Engineering NEMA motor tutorial error
@yankee14
yankee14 / init.vim
Last active October 22, 2020 14:53
let g:ycm_global_ycm_extra_conf = '~/.vim/.ycm_extra_conf.py'
syntax on
filetype plugin indent on
""" BEGIN Octave syntax plugin
augroup filetypedetect
" GNU Octave (MATLAB)
autocmd! BufRead,BufNewFile *.m,*.ct set filetype=octave
" waf build
@yankee14
yankee14 / 99-hl7618-modem.rules
Created July 1, 2019 05:07
udev rules to create better symlinks for Sierra Wireless HL7618 modems in ACM/NCM (+KUSBCOMP: 0) mode, or MBIM (+KUSBCOMP: 2) mode
# Sierra Wireless HL7618 modems come from the factory configured for
# CDC-ACM/NCM mode. This mode can be used to establish an internet
# connection using PPP for CDC-ACM, or NCM. It can also be used
# in MBIM mode. The modes can be changed by issuing 'AT+KUSBCOMP=<MODE>',
# where <MODE> is 0 for ACM/NCM, or 2 for MBIM.
#
# When in NCM mode (+KSUBCOMP: 0), the modem appears to Linux as having 7
# distinct interfaces:
# 1. tty 0 - AT command interface/ACM interface
# 2. tty 1 - Proprietary debug interface
[general]
version = 4
name = 0.1 mm layer height for 0.4 mm nozzle
definition = fdmprinter
[metadata]
type = quality_changes
quality_type = normal
setting_version = 7
@yankee14
yankee14 / tfuncplot.m
Last active April 15, 2016 11:22
MATLAB script to generate a complex 3D surface representation of a transfer function.
% tfuncplot.m
% Plots a complex 3D surface representation of transfer function.
%
% Author: Ed Peguillan III
% Date: 15 April, 2016, 04:49 UTC
%
% DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
% Version 2, December 2004
%
% Copyright (C) 2016 Ed Peguillan III <yankee14.ed@gmail.com>