Skip to content

Instantly share code, notes, and snippets.

Nick Bair njbair

Block or report user

Report or block njbair

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@njbair
njbair / s3cachecontrol.py
Created Nov 29, 2013
Sets a Cache-Control HTTP header on all matching objects in an Amazon S3 bucket
View s3cachecontrol.py
#!/usr/bin/python
# Amazon S3 Cache-Control Processor
#
# Programmatically applies the specified Cache-Control metadata to all
# matching objects (files) in an S3 bucket
#
# Uses the excellent boto library <http://docs.pythonboto.org>
@njbair
njbair / html-markup-shortcodes.php
Created Feb 21, 2015
Custom HTML WordPress Shortcode - add any HTML tag in the WYSIWYG editor!
View html-markup-shortcodes.php
/**
* HTML MARKUP SHORTCODES
* by Nick Bair
*
* This is a nice little cheater shortcode for devs who don't want the WordPress
* WYSIWYG editor to strip out their HTML tags.
*
*
*
* USAGE
@njbair
njbair / HOWTO-debian-build-box.md
Last active Sep 11, 2015
Setting up a base Debian installation as a generic build environment
View HOWTO-debian-build-box.md

HOWTO: Debian Build Box

This is a quick how-to on setting up a fresh Debian installation as a multi-purpose build environment. By fresh installation, we're talking about a bare-bones netinst with all installation tasks unchecked. If you choose to install standard system utilities, many of these packages will already be installed.

First, login as a standard user, then issue the su command to elevate to root:

$ su
Password:

Install Some Software

@njbair
njbair / amd_A8-5600K_cpuids.sh
Last active Apr 4, 2019
Use these CPUID flags to trick your Windows 7 VirtualBox VM into thinking your AMD Ryzen is an AMD A8-5600K.
View amd_A8-5600K_cpuids.sh
#!/bin/sh
vboxmanage modifyvm "Windows 7" --cpuidset 00000000 0000000d 68747541 444d4163 69746e65
vboxmanage modifyvm "Windows 7" --cpuidset 00000001 00610f01 01040800 3e98320b 178bfbff
vboxmanage modifyvm "Windows 7" --cpuidset 00000002 00000000 00000000 00000000 00000000
vboxmanage modifyvm "Windows 7" --cpuidset 00000003 00000000 00000000 00000000 00000000
vboxmanage modifyvm "Windows 7" --cpuidset 00000004 00000000 00000000 00000000 00000000
vboxmanage modifyvm "Windows 7" --cpuidset 00000005 00000040 00000040 00000003 00000000
vboxmanage modifyvm "Windows 7" --cpuidset 00000006 00000000 00000000 00000001 00000000
vboxmanage modifyvm "Windows 7" --cpuidset 00000007 00000000 00000008 00000000 00000000
@njbair
njbair / docker-compose.yml
Created Mar 14, 2019
WordPress, MySQL 5.7, Adminer for Local Dev
View docker-compose.yml
version: '3.1'
services:
wordpress:
image: wordpress
ports:
- 80:80
environment:
WORDPRESS_DB_HOST: db
You can’t perform that action at this time.