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
@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
@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
@jdolitsky
jdolitsky / helm-3-chart-command.md
Last active February 3, 2019 04:59
Current progress of Helm 3 changes related to working with registries

Helm 3 chart command

Note: this is a work in progress, and is subject to change soon.

Chart Subcommands

save

save a chart directory

@ryanmaclean
ryanmaclean / tmux-cheatsheet.markdown
Last active July 29, 2021 16:36 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@lightdiscord
lightdiscord / netlify.sh
Last active July 5, 2021 15:20
Rust and wasm and netlify
#!/usr/bin/env bash
set -e
cweb_version=0.6.16
cweb=https://github.com/koute/cargo-web/releases/download/$cweb_version/cargo-web-x86_64-unknown-linux-gnu.gz
curl -Lo cargo-web.gz $cweb
gunzip cargo-web.gz
chmod u+x cargo-web
@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 ------------------------------------------------------------
@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.
@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
@toricls
toricls / kibana.sh
Last active February 26, 2016 23:05
Kibana 4 Init script for Amazon Linux
#!/bin/sh
### BEGIN INIT INFO
# Provides: kibana
# Required-Start: $local_fs $remote_fs $network
# Should-Start: $time
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Kibana 4
@mcgirr
mcgirr / emoji.c
Created September 26, 2014 19:45
C code to simply print the cocktail Emoji to the terminal.
/*
* emoji.c
* Mike McGirr
* A little bit of code to print out the cocktail emoji.
*/
#include <stdio.h>
#include <wchar.h>
#include <locale.h>
int main()