Skip to content

Instantly share code, notes, and snippets.

View jfrobbins's full-sized avatar

Jon Robbins jfrobbins

  • NC
  • 02:01 (UTC -05:00)
View GitHub Profile
@jfrobbins
jfrobbins / create-favicon-ubuntu.md
Created December 22, 2024 15:44
Create a favicon.ico icon on linux

Creating a Multi-Resolution Favicon for Your Website

In today's web environment, having a favicon that looks good across various devices and screen resolutions is crucial. Here's a simple guide on how to create a multi-size favicon.ico file from a single 128x128 pixel image, using GIMP for resizing and icoutils on Ubuntu Linux for the final ICO creation.

Step 1: Preparing Your Image

Using GIMP to Resize Your Image

  1. Open Your Image:
@jfrobbins
jfrobbins / my-first-5-minutes-on-a-server.md
Last active December 13, 2024 01:42
My First 5 Minutes On A Server; Or, Essential Security for Linux Servers -- PlusBryan.com

I originally grabbed this a long time ago from plusbryan.com, but now it appears to be down... so I'm glad I saved it.

I also posted on my blog, here:

My First 5 Minutes On A Server; Or, Essential Security for Linux Servers

Server security doesn't need to be complicated. My security philosophy is simple: adopt principles that will protect you from the most frequent attack vectors, while keeping administration efficient enough that you won't develop "security cruft". If you use your first 5 minutes on a server wisely, I believe you can do that.

Any seasoned sysadmin can tell you that as you grow and add more servers & developers, user administration inevitably becomes a burden. Maintaining conventional access grants in the environment of a fast growing startup is an uphill battle - you're bound to end up with stale passwords, abandoned intern accounts, and a myriad of "I have sudo access to Server A, but

@jfrobbins
jfrobbins / convert-pelican-posts-to-hugo-md.py
Last active December 6, 2024 12:32
Converts pelican posts to hugo markdown
import os
import yaml
import argparse
from datetime import datetime
def convert_post(input_path, output_path):
with open(input_path, 'r') as file:
lines = file.readlines()
# Initialize front matter with default values
@jfrobbins
jfrobbins / transcode_mp4_files_x265.py
Last active December 6, 2024 13:32
Transcode MP4 video file for smaller file size (lower bitrate)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
transcode_mp4_files_x265.py
A script to batch transcode .mp4 files using FFmpeg with configurable CRF values.
source: https://gist.github.com/jfrobbins/0f8ef94b1a7ff780f74a320a2fd9530c
############################################################################
@jfrobbins
jfrobbins / conv-markdown-to-pdf.md
Created October 29, 2024 18:30
Converting markdown to PDFs with pandoc on macOS
@jfrobbins
jfrobbins / clean-boot-partition-for-upgrade.md
Created September 22, 2024 16:05
Safest way to clean up /boot partition (Ubuntu Linux)
@jfrobbins
jfrobbins / create-mp4-from-pictures.md
Created July 28, 2024 15:20
Create mp4 from pictures
@jfrobbins
jfrobbins / fibonacci_riddle.py
Created March 4, 2017 02:56
playing with fibonacci riddles and primes
######################################
# Let Fib(n) be the string formed by concatenating the first n sequential
# Fibonacci numbers (i.e. Fib(0) = 1, Fib(1) = 11, Fib(2) = 112, …).
##
# Find the first ten-digit prime number that occurs as twenty sequential
# digits in Fib(n).
#
# This prime number is the result (2584418167)
######################################
# Jon Robbins
@jfrobbins
jfrobbins / LoopIncrementor.py
Created June 2, 2016 17:08
For some number of start/stop/step combinations, iterate through and generate a list of all of the unique combinations
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
@jfrobbins
jfrobbins / tConv.go
Created June 22, 2015 11:45
just some practice with syntax, playing with go. This converts Farenheit<->Celsius.
//File tConv.go
//=================================================
//syntax:
// ./tConv -F 96
// Output: 96.00°F is equal to 35.56°C
//./tConv -C 35.5
// Output: 35.50°C is equal to 95.90°F
//=================================================