Skip to content

Instantly share code, notes, and snippets.

View Nezteb's full-sized avatar
💣
hello world'); DROP TABLE Statuses;--

Noah Betzen Nezteb

💣
hello world'); DROP TABLE Statuses;--
View GitHub Profile
#!/bin/bash
# Noah Betzen
# CentOS 7.1 Minimal Image
# DjangoCMS 3.2.0 Install Steps
# CONFIRMED WORKING AS OF 2-24-16
# Server address for nginx
serverAddress=`/sbin/ifconfig -a | awk '/(cast)/ { print $2 }' | cut -d':' -f2 | head -1` # Fancy stuff to get IP only
#!/bin/bash
# Noah Betzen
# CentOS 7.1 Minimal Image
# GravCMS 1.0.10 Install Steps
# CONFIRMED WORKING 2-29-16
# Path variables you should set
serverFilesPath=/var/www/html
@Nezteb
Nezteb / Download_Songs.sh
Last active July 23, 2021 15:05
Downloads specified youtube videos as songs given text file.
#!/bin/bash
# Download_Songs.sh
# By Noah Betzen (Nezteb)
#
# Requires youtube-dl: https://rg3.github.io/youtube-dl/
# You can install youtube-dl via most package managers:
# brew install youtube-dl
# apt-get install youtube-dl
#
@Nezteb
Nezteb / General_Ubuntu14-04_Setup.sh
Last active October 22, 2021 21:37
A general script for me to set up Ubuntu 14.04 quickly.
#!/bin/bash
# Noah Betzen
# Ubuntu 14.04 Basic Setup
#################### VARIABLES TO CHANGE
SSHPORT=22 # change this if you want
WEBPORT=80 # change this if you want
HTTPSPORT=443 # change this if you want
#################### DO NOT EDIT BELOW THIS LINE
@Nezteb
Nezteb / Wordpress_Install.sh
Last active July 4, 2016 20:31
Script to setup Wordpress on Ubuntu 14.04 with nginx.
#!/bin/bash
# Noah Betzen
# Ubuntu 14.04 WordPress Install Steps
# You should run this first: https://gist.github.com/Nezteb/1e0ccd82cc843b9c76e3b2bb929605eb
#################### VARIABLES TO CHANGE
read -p "Server domain name: " serverAddress # prompt server address for nginx
read -p "Your email address: " emailAddress # prompt email address for postfix
serverFilesPath=/var/www/html # web root location
mysqlUsername=mysql # mysql credentials
@Nezteb
Nezteb / convert_m4a_to_mp3.sh
Created March 19, 2017 00:40
Convert m4a files to mp3 files. Requires ffmpeg.
#!/bin/bash
// cd into a directory with m4a files
for f in *.m4a; do ffmpeg -i "$f" -codec:v copy -codec:a libmp3lame -q:a 2 "${f%.m4a}.mp3"; done
@Nezteb
Nezteb / .bash_profile
Last active July 10, 2018 17:58
Simple Github account management
# This is specific to Github, but could apply to any git provider
# To start, you'll have to set up two sets of git SSH keys.
# Assuming you have your personal account set up by default:
# * ~/.ssh/id_rsa (your personal ssh private key)
# * ~/.ssh/id_rsa.pub (your personal ssh public key)
# * ~/.ssh/backup/work (your work ssh private key)
# * ~/.ssh/backup/work.pub (your work ssh public key)
@Nezteb
Nezteb / setup-python-on-mac.sh
Last active July 23, 2020 04:48
Some tips on installing Python on Mac... (this is very messy for now)
# First verify you have Homebrew: https://brew.sh/
# Put this line in your ~/.bash_profile, this will make sure your Homebrew binaries are used first
export PATH="/usr/local/bin":"/usr/local/sbin":"$PATH"
########## ON A FRESH INSTALL ##########
# Verify the output here does not contain anything related to Python
echo $PATH
# If it does contain Python stuff, figure out where that is coming from (probably ~/.bash_profile) and remove it
@Nezteb
Nezteb / chunk_promise.js
Last active March 27, 2023 21:29
Say you have 100 promises worth of work but want to ensure only 5 happen at a time; you want to chunk the promises.
// Originally by @FizzyGalacticus
// https://github.com/FizzyGalacticus/chunky-promise
// Modified by me
function chunkList(originalList = [], chunkSize = 5) {
const listOfChunks = [];
for(let i = 0; i < originalList.length; i += chunkSize) {
const chunk = originalList.slice(i, i + chunkSize)
listOfChunks.push(chunk);
@Nezteb
Nezteb / backups.sh
Last active June 21, 2021 03:50
A script I use to back stuff up
#!/bin/bash
# CHANGE THESE
SUFFIX="personal"
BACKUPS_DIR="${HOME}/SomeCloudStorage/backups/${SUFFIX}"
PROFILE_FILENAME="zshrc" # bash_profile, bashrc, zshrc, etc. (without dots)
echo "Starting backup script..."
mkdir -p "${BACKUPS_DIR}"
date >"${BACKUPS_DIR}/_date_of_last_backup_${SUFFIX}.txt"