Skip to content

Instantly share code, notes, and snippets.

View shoemoney's full-sized avatar

Jeremy Schoemaker shoemoney

View GitHub Profile
@shoemoney
shoemoney / understanding_systemd_boot_execution_graph.md
Created October 5, 2021 14:56 — forked from CMCDragonkai/understanding_systemd_boot_execution_graph.md
Understanding systemd Boot Execution Graph #systemd
@shoemoney
shoemoney / http_streaming.md
Created October 5, 2021 14:53 — forked from christianromney/http_streaming.md
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

#!/usr/bin/env bash
set -o pipefail
slow_compute_hash() {
find "$1" -type f -exec md5sum {} \; | sort -k 2 | md5sum
}
fast_compute_hash() {
find "$1" -type f -print0 | sort -z | xargs -0 md5sum | md5sum
}
@shoemoney
shoemoney / README.md
Created October 5, 2021 10:42 — forked from socheatsok78/README.md
lnav — Laravel Log Formatter

Laravel Log Formatter for Lnav


Installation

lnav -i https://gist.github.com/80d1d179c5706f85b281a5558217a5fe.git
# or
lnav -i [email protected]:80d1d179c5706f85b281a5558217a5fe.git

Usage

@shoemoney
shoemoney / mkramdisk-mac-osx.sh
Created October 3, 2021 09:28
Make a ram disk on mac in 2021. !!
//this makes a 8gb RAM DISK
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://16384000`
@shoemoney
shoemoney / checkifempty.bash
Created October 2, 2021 11:06
Bash compare operators
Check if empty
if [ -z "$var" ]
then
echo "\$var is empty"
else
echo "\$var is NOT empty"
fi
OR
@shoemoney
shoemoney / install_latest_nodejs_amazon_linux_2.sh
Created September 27, 2021 13:04
install latest nodejs on amazon linux 2 and no stupid issues
sudo yum install gcc-c++ make
sudo curl -sL https://rpm.nodesource.com/setup_16.x | sudo bash -
sudo yum install -y nodejs
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install yarn
@shoemoney
shoemoney / ec2makeswap.sh
Created September 27, 2021 12:49
Create Swap Partition and Activate On Amazon Linux 2
#first create the file this will make a 4gb file. do 20 count for 2gb etc..
sudo dd if=/dev/zero of=/swapfile bs=128M count=32
chmod 600 /swapfile
#format the file properly with mkswap
sudo mkswap /swapfile
#tell your system to activate it
swapon /swapfile
#test swap file
swapon -s
#if no errors add to fstab so it auto mounts:
@shoemoney
shoemoney / amzningx.sh
Created September 25, 2021 01:15
Amazon Linux 2 - Because other installs suck. This is a work in progresss
enable amazon-linux-extras
enable epel extras
adduser nginx
update yum
upgrade yum
##get katest nginx
cd /tmp/
@shoemoney
shoemoney / pro-machine-learning.md
Created September 24, 2021 09:47
Guide to become pro at machine learning

Everything You Need To Become A Machine Learner

Part 1:

Everything You Need To Become A Machine Learner

Part 1:

*This list of resources is specifically targeted at Web Developers and Data Scientists…. so do with it what you will…* > *This list borrows heavily from multiple lists created by :* sindresorhus Machine learning is a subfield of artificial intelligence, which is broadly defined as the capability of a machine to imitate intelligent human behavior. Artificial intelligence systems are used to perform complex tasks in a way that is similar to how humans solve problems. > *The goal of AI is to create computer models that exhibit “i