Skip to content

Instantly share code, notes, and snippets.

View haydenjames's full-sized avatar
🏠
Working from home

Hayden James haydenjames

🏠
Working from home
View GitHub Profile
@haydenjames
haydenjames / benchmark.sh
Created October 31, 2017 00:55 — forked from peterjmit/benchmark.sh
Bash Benchmark Script (using time)
#!/bin/bash
# REQUIRES SUDO
# Benchmark runner
repeats=20
output_file='benchmark_results.csv'
command_to_run='echo 1'
run_tests() {
# --------------------------------------------------------------------------
@haydenjames
haydenjames / extract-attachments.py
Created October 24, 2017 13:32 — forked from stefansundin/extract-attachments.py
Extract attachments from emails that Gmail doesn't allow you to download. This is dumb. Please use Python >= 3.4.
#!/usr/bin/env python3
# Get your files that Gmail block. Warning message:
# "Anti-virus warning - 1 attachment contains a virus or blocked file. Downloading this attachment is disabled."
# Based on: http://spapas.github.io/2014/10/23/retrieve-gmail-blocked-attachments/
# Go to your emails, click the arrow button in the top right, "Show original", then "Download Original". Move the file to the same directory as this script.
import email
import sys
import os
<?php
/**
* Plugin Name: NGINX FastCGI cache purge
* Version: 0.1
* Description: Flush NGINX FastCGI cache purge
* Author: The Shipyard Crew
* Author URI: https://theshipyard.se/
* Plugin URI: https://theshipyard.se/
* Text Domain: nginx-fastcgi-cache-purge
@haydenjames
haydenjames / ocp.php
Created August 13, 2017 15:47 — forked from ck-on/ocp.php
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter

Keybase proof

I hereby claim:

  • I am haydenjames on github.
  • I am hydn (https://keybase.io/hydn) on keybase.
  • I have a public key whose fingerprint is 7E9E CEB0 42F8 F1C4 6501 5190 A1CD 8EB6 9171 4975

To claim this, I am signing this object: