This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'socket' | |
require 'optparse' | |
require 'resolv' | |
$options = {} | |
optparse = OptionParser.new do |opts| | |
opts.banner = "Usage: #{__FILE__} <options>" | |
$options[:to] = nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes auto; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in *.wav; do lame -b 320 -h "${i}" "${i%.wav}.mp3"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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>", |