Skip to content

Instantly share code, notes, and snippets.

View ericbaranowski's full-sized avatar

Eric Baranowski ericbaranowski

View GitHub Profile
require 'socket'
require 'optparse'
require 'resolv'
$options = {}
optparse = OptionParser.new do |opts|
opts.banner = "Usage: #{__FILE__} <options>"
$options[:to] = nil
#!/bin/bash
err=""; \
[ "$(uname) $(uname -m)" = "Linux x86_64" ] \
|| err="ERROR: your system is not Linux x86_64."; \
[ -r /dev/kvm ] && [ -w /dev/kvm ] \
|| err="$err\nERROR: /dev/kvm is innaccessible."; \
(( $(uname -r | cut -d. -f1)*1000 + $(uname -r | cut -d. -f2) >= 4014 )) \
|| err="$err\nERROR: your kernel version ($(uname -r)) is too old."; \
dmesg | grep -i "hypervisor detected" \
// ==UserScript==
// @name Auto Check-In to Southwest Flights
// @namespace http://www.ryanizzo.com/southwest-auto-check-in/
// @version 1.7
// @author Nicholas Buroojy (http://userscripts.org/users/83813)
// @contributor Ryan Izzo (http://www.ryanizzo.com)
// @contributor JR Hehnly (http://www.okstorms.com @stormchasing)
// @contributor Trevor McClellan (github.com/trevormcclellan)
// @description Automatically check in to Southwest Airline flights at the appropriate time.
// @include https://www.southwest.com/air/check-in/index.html*
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
#!/bin/bash
#
# This script is meant to be run on Ubuntu Trusty (14.04) as root
#
# It is expected that you are following the guide at:
# https://kubernetes.io/docs/setup/independent/install-kubeadm/
# https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/
#
# Particularly you will need to have (BEFORE you start):
# - binutils, ebtables, socat installed
#!/bin/bash
sudo apt-get build-dep -y aptitude zsh rake git curl wget docker.io
sudo apt-get install -y aptitude zsh rake git curl wget docker.io
sh -c "`curl -fsSL https://raw.githubusercontent.com/skwp/dotfiles/master/install.sh`"
sudo apt-get update && sudo apt-get upgrade -y
sudo apt full-upgrade -y
sudo apt autoremove -y
sudo apt-get update && sudo apt-get upgrade -y
#!/bin/bash
git clone --recursive https://github.com/pyenv/pyenv ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshenv
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshenv
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshenv
source ~/.zshenv
pyenv install 3.6.7
pyenv local 3.6.7 && pyenv shell 3.6.7 && pyenv global 3.6.7
# form is submitted via a POST request to the /register route
@app.route('/register', methods=['GET', 'POST'])
def register():
# this is using a class created using WTForms
form = RegForm()
if request.method == 'POST':
# form is validated via WTForms .validate() method
if form.validate():
# checks if submitted email has already been registered
existing_user = User.objects(email=form.email.data).first()
@ericbaranowski
ericbaranowski / wav-mp3
Created August 20, 2018 22:49 — forked from championofblocks/wav-mp3
Command line bash to convert all wav to mp3
for i in *.wav; do lame -b 320 -h "${i}" "${i%.wav}.mp3"; done
{
"AzureAd": {
"AppId": "<to be updated>",
"ClientId": "<to be updated>",
"ClientSecret": "<to be updated>", // This sample uses a password (secret) to authenticate. Production apps should use a certificate.
"Instance": "https://login.microsoftonline.com/",
"Domain": "<to be updated>",
"TenantId": "<to be updated>",
"CallbackPath": "/signin-oidc",
"BaseUrl": "<to be updated>",