Skip to content

Instantly share code, notes, and snippets.

View dittmaraz's full-sized avatar

Sean Dittmar dittmaraz

View GitHub Profile
@dittmaraz
dittmaraz / bitvue.md
Last active October 5, 2019 03:33
Bit / Vue.js quick reference
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Invalid argument count, expected: 1"
usage()
exit
fi
PRJNAME="$1"
echo "Project name set to: $PRJNAME"
mkdir -p "$PRJNAME"
cd "$PRJNAME"
@dittmaraz
dittmaraz / mongo-cheatsheet.md
Last active March 5, 2024 19:21
MongoDB/Docker Cheatsheet

Mongo/Docker Cheatsheet

To download the latest image:

$ docker pull mongo:latest

To run a mongo container with detached mode(-p) and with ports mapped (-p 27017-27017:27017-27019) and named (--name mongodb):

$ docker run -d -p 27017-27017:27017-27019 --name mongodb mongo:latest

@dittmaraz
dittmaraz / sortit.sh
Created July 18, 2019 11:48
project sort bash script
for PRJDIR in $(ls -d */) # for each d in current dir
do
echo "Project Path: $PRJDIR" # print current dir to sort
options=("Move" "Delete" "Nothing") # Sort action array
echo
PS3="Select Action: "
select opt in "${options[@]}"; do # make menu from actions
echo
case $opt in
@dittmaraz
dittmaraz / setuppi.sh
Created July 14, 2019 08:53
This script enables a Raspberry Pi Zero W for headless configuration.
#!/bin/sh
# This script enables a Raspberry Pi Zero W for headless configuration.
clear
lsblk
read -p "Enter the path to your SDcard: " SDCARDPATH
# TODO: Validate SDCARDPATH