Skip to content

Instantly share code, notes, and snippets.

View knmurphy's full-sized avatar
🏴

Kevin N. Murphy knmurphy

🏴
View GitHub Profile
@knmurphy
knmurphy / code-editor-rules.md
Created December 17, 2024 02:18 — forked from yifanzz/code-editor-rules.md
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
{
"version": "1.0.3",
"fields": {
"name": {
"type": "text",
"label": "Project Name",
"required": true,
"enabled": true,
"glideMapping": "Name",
"order": 1
@knmurphy
knmurphy / get-table.py
Created April 24, 2024 14:19
Python 3 script to extract tables from a pdf page and output as csv files in same directory
import pdfplumber
import pandas as pd
import os
def list_pdf_files(directory):
"""List all PDF files in the given directory."""
pdf_files = [f for f in os.listdir(directory) if f.endswith('.pdf')]
for index, file in enumerate(pdf_files):
print(f"{index + 1}: {file}")
return pdf_files
@knmurphy
knmurphy / reduce-pdf-size.py
Created April 18, 2024 05:43
A python script for using a few tools to incrementally reduce PDF file size, the most destructive step is the last step.
import os
import subprocess
import shlex
def get_file_size(file_path):
size_in_bytes = os.path.getsize(file_path)
if size_in_bytes < 1024:
return f'{size_in_bytes} bytes'
elif size_in_bytes < 1024 * 1024:
return f'{size_in_bytes / 1024:.2f} KB'
@knmurphy
knmurphy / shoot-sharing-image.js
Created March 18, 2021 22:04 — forked from drewm/shoot-sharing-image.js
Dynamic Social Sharing Images
const puppeteer = require('puppeteer');
const imagemin = require('imagemin');
const imageminPngquant = require('imagemin-pngquant');
// Get the URL and the slug segment from it
const url = process.argv[2];
const segments = url.split('/');
const slug = segments[segments.length-2];
(async () => {
@knmurphy
knmurphy / install_ffmpeg.sh
Created December 18, 2020 22:45 — forked from statik/install_ffmpeg.sh
brew install ffmpeg with all options
brew uninstall --force --ignore-dependencies ffmpeg
brew install --ignore-dependencies chromaprint
brew install amiaopensource/amiaos/decklinksdk
brew cask install xquartz
options=$(brew options homebrew-ffmpeg/ffmpeg/ffmpeg | grep -vE '\s' | grep -- '--with-' | grep -vi game-music-emu | tr '\n' ' ')
brew install homebrew-ffmpeg/ffmpeg/ffmpeg ${options}
@knmurphy
knmurphy / 01. Download Locations for FFmpeg.md
Created August 10, 2020 23:39 — forked from AbsoluteDestiny/01. Download Locations for FFmpeg.md
Some FFMpeg commands I need to remember for converting footage for video editing. http://bit.ly/vidsnippets
@knmurphy
knmurphy / zcam GET info
Created July 27, 2020 23:04
response from zcam http api GET /info
{"model":"elephant","number":"1","sw":"0.96.0","hw":"1.0","mac":"72:6c:92:68:43:33","eth_ip":"192.168.88.246","sn":"524C0040224","ble":"0.14","bt_mac":"","feature":{"platform":"hisi","product_catalog":"camera","rebootAfterClearSettings":"0","rebootAfterVideoSystem":"0","upgradeWOCard":"1","fwName":"*.zip","fwCheck":"1","md5Check":"1","setCfgToAll":"0","syncOnlyMaster":"1","stopPreviewInSnap":"0","stopPreviewInTimelapse":"0","photoSupport":"1","wsSupport":"1","release":true,"snapSupportExposureMode":"1","snapSupportFmt":{"isAllFmt":"1","fmt":["C4KP29.97 (Low Noise)","C4KP23.98 (Low Noise)","4KP29.97 (Low Noise)","4KP23.98 (Low Noise)","C4KP29.97","C4KP23.98","4KP29.97","4KP23.98","2880P29.97 (1:1)","2880P23.98 (1:1)","2336x1344P59.94","2336x1344P29.97","2336x1344P23.98","1080P59.94","1080P29.97","1080P23.98","C4KP25 (Low Noise)","4KP25 (Low Noise)","C4KP25","4KP25","2880P25 (1:1)","2336x1344P50","2336x1344P25","1080P50","1080P25","C4KP24 (Low Noise)","4KP24 (Low Noise)","C4KP24","4KP24","2880P24 (1:1)","2336x1
@knmurphy
knmurphy / journal.markdown
Created January 1, 2019 16:15
The currently template I use when doing my daily journal.

Filename: MONTH-DAY-YEAR-title.markdown

Weekday, Month DayNumber, Year

Diary / Title

What did I do today?


@knmurphy
knmurphy / sampleREADME.md
Created November 15, 2018 22:48 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here