Skip to content

Instantly share code, notes, and snippets.

View ryanmaclean's full-sized avatar
🍩
Running tf apply 💜

Ryan MacLean ryanmaclean

🍩
Running tf apply 💜
View GitHub Profile
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 2, 2024 03:13
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@sgergely
sgergely / gist:3793166
Created September 27, 2012 09:43
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
@bmatcuk
bmatcuk / create-usb.sh
Created May 30, 2019 04:38
Creating a Bootable Windows USB from ISO on a Mac
# First, we need to find our device. BEFORE inserting your USB drive, run the
# following:
diskutil list
# This will output a bunch of info about all of the disk drives connected to
# your Mac. Each entry will have a header in the form "/dev/diskX", where X is
# some number starting at 0. Now, insert your USB drive and run the command
# again. You should see a new entry. Make note of the name (ie, /dev/diskX).
diskutil list
@agnoster
agnoster / README.md
Last active April 6, 2024 22:35
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@buzzsurfr
buzzsurfr / watchpids.sh
Last active February 21, 2024 00:29
Script to display the process IDs of docker container processes and subprocesses
#!/bin/bash
pidlist() {
local thispid=$1
local fulllist=
local childlist=
childlist=$(ps --ppid $thispid -o pid h)
for pid in $childlist
do
fulllist="$(pidlist $pid) $fulllist"
done
@sevennineteen
sevennineteen / example.json
Created December 28, 2012 18:16
Example using Jinja2 to populate a JSON payload template
{ "path": "/content/geometrixx/my-first-jinja-page",
"properties": [
{ "name": "jcr:primaryType",
"value": "cq:Page" }],
"nodes": [
{ "path": "jcr:content",
"properties": [
{ "name": "jcr:primaryType",
"value": "cq:PageContent"},
@wafsek
wafsek / whiptailmenu.bash
Last active September 4, 2023 17:53
A Example of whiptail menu with functions
#! /bin/bash
# This program is just an example of how to make a whiptail menu and some basic commands.
# Copyright (C) 2016 Baljit Singh Sarai
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License.
@chrisfcarroll
chrisfcarroll / Bash-or-PowerShell-with-Param.ps1
Last active August 23, 2023 11:41
Hold both bash and PowerShell code in a single script file and/or make a PowerShell.ps1 script executable on all platforms. For Windows, *nix, linux and macOs. See Comments below
` # \
# PowerShell Param statement : every line must end in #\ except the last line must with <#\
# And, you can't use backticks in this section #\
param( [ValidateSet('A','B')]$tabCompletionWorksHere, #\
[switch]$andHere #\
) <#\
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# Bash Start ------------------------------------------------------------
@kimmobrunfeldt
kimmobrunfeldt / 0-osx-for-web-development.md
Last active July 26, 2022 13:30
Install web development tools to Mavericks (OS X 10.9)

Install web development tools to Mavericks (OS X 10.9)

Strongly opinionated set of guides to quickly setup OS X Mavericks for web development. By default OS X hides stuff that normal people don't need to see. These settings are better defaults for developers.

I don't want: any sounds, annoying confirmation dialogs, hidden extensions, superflous animations, unnecessary things running like Dashboard, Notification center or Dock(Alfred/spotlight works better for me).

These are my opinions. Read this document through and pick up the good parts to your preferences.

System preferences

@eribeiro
eribeiro / gource-ffmpeg.sh
Last active February 11, 2022 16:23
Run Gource on a git repo, outputs as a movie (movie.mp4) and compresses it (output.mp4)
gource -s .06 -1280x720 --auto-skip-seconds .1 --multi-sampling --stop-at-end --key --highlight-users --hide mouse,progress,files,filenames,dirnames --file-idle-time 0 --max-files 0 --background-colour 000000 --font-size 22 --title "Lucene/Solr" --output-ppm-stream - --output-framerate 30 | avconv -y -r 30 -f image2pipe -vcodec ppm -i - -b 65536K movie.mp4
&& ffmpeg -i movie.mp4 -b:v 3048780 -vcodec libx264 -crf 24 output.mp4