Skip to content

Instantly share code, notes, and snippets.

View GLMeece's full-sized avatar

Greg Meece GLMeece

View GitHub Profile
@GLMeece
GLMeece / nano_install_and_config.md
Last active March 7, 2024 18:02
NANO on macOS and Windows

NANO on macOS and Windows

This should get you up and running with the installation and basic configuration of GNU Nano on both macOS and Windows. In the case of macOS, this will install a newer version of Nano that includes syntax highlighting.

macOS Installation

Homebrew

It is assumed you already have Homebrew installed. If not, then Verify or Install Apple's Command-line Tools and then proceed with the installation of Homebrew. 🍺

@pudquick
pudquick / brew.md
Last active April 6, 2024 21:42
Lightly "sandboxed" homebrew on macOS

brew is a bad neighbor

This isn't a guide about locking down homebrew so that it can't touch the rest of your system security-wise.

This guide doesn't fix the inherent security issues of a package management system that will literally yell at you if you try to do something about "huh, maybe it's not great my executables are writeable by my account without requiring authorization first".

But it absolutely is a guide about shoving it into its own little corner so that you can take it or leave it as you see fit, instead of just letting the project do what it likes like completely taking over permissions and ownership of a directory that might be in use by other software on your Mac and stomping all over their contents.

By following this guide you will:

  • Never have to run sudo to forcefully change permissions of some directory to be owned by your account
@GLMeece
GLMeece / new_macos_machine_setup.md
Last active December 1, 2022 15:25
New macOS Machine Setup

New macOS Machine Setup

This guide is based on my own experience, but also draws on other guides. It is primarily oriented towards those doing code-related stuff (e.g., I'm mostly an SDET, but is also applicable to those doing either Python or Web-based development).

A couple of other examples:

Most of the setup will use the terminal. For more details on how to setup an awesome terminal experience on the Mac, see my guide Steps to Terminal Enlightenment on a Mac (tweaking your terminal for fun and profit), which in fact includes some of these steps (you're welcome!).

@devadvance
devadvance / part_video_to_gif.sh
Created February 28, 2021 03:10
Create animated GIF and WebP from videos using ffmpeg
ffmpeg -ss $INPUT_START_TIME -t $LENGTH -i $INPUT_FILENAME \
-vf "fps=$OUTPUT_FPS,scale=$OUTPUT_WIDTH:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" \
-loop $NUMBER_OF_LOOPS $OUTPUT_FILENAME
# Change these placeholders:
# * $INPUT_START_TIME - number of seconds in the input video to start from.
# * $LENGTH - number of seconds to convert from the input video.
# * $INPUT_FILENAME - path to the input video.
# * $OUTPUT_FPS - ouput frames per second. Start with `10`.
# * $OUTPUT_WIDTH - output width in pixels. Aspect ratio is maintained.
@GLMeece
GLMeece / docker_cheatsheet.md
Last active February 8, 2021 17:45
Docker Cheat Sheet

Useful Docker Cheat Sheet

Random Tips

  • FROM — specifies the base (parent) image; typically you specify both the image name as well as the label. 🍰
  • RUN — runs a command and creates an image layer. Used to install packages into containers. 🍰
@junagao
junagao / vscode-italic-font-settings.md
Last active January 24, 2024 13:30
VSCode italic font settings

VSCode italic font settings

Add this to settings.json (cmd ,):

{
  "editor.fontFamily": "Operator Mono, Fira Code iScript, Menlo, Monaco, 'Courier New', monospace",
  "editor.fontLigatures": true,
  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
@steven2358
steven2358 / ffmpeg.md
Last active May 10, 2024 20:57
FFmpeg cheat sheet
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 10, 2024 20:54
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@Tset-Noitamotua
Tset-Noitamotua / _Create_Webdriver.md
Last active May 31, 2021 11:06
Robot Framework Selenium2Library - "Create Webdriver" Keyword Examples

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns                     on recent CPU
L2 cache reference ........................... 7 ns                     14x L1 cache
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns                     20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs 4X memory