Skip to content

Instantly share code, notes, and snippets.

View drewjoh's full-sized avatar

Drew Johnston drewjoh

View GitHub Profile
@drewjoh
drewjoh / ocp.php
Created June 20, 2013 16:57 — forked from ck-on/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs
@drewjoh
drewjoh / drewjoh.zsh-theme
Created March 24, 2016 14:58
OhMyZsh Custom Theme
#
# Forked from https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572).
#
# In addition, I recommend the
@drewjoh
drewjoh / Cors.php
Created June 13, 2016 22:47
Laravel CORS Middleware
<?php // /app/Http/Middleware/Cors.php
namespace App\Http\Middleware;
use Closure;
class Cors {
public function handle($request, Closure $next)
{
return $next($request)

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@drewjoh
drewjoh / sample.md
Last active June 18, 2019 23:01
Sample SSH Key Setup

First check that we have an ssh key. Type this in your terminal:

pbcopy < ~/.ssh/id_rsa.pub

If you get no error message, SUCCESS! Go to onetimesecret.com, paste your clipboard, and send me the link provided.

If you get the error: "No such file or directory"... follow these steps:

  1. Open Terminal.
  2. Paste the text below, substituting in your email address.
@drewjoh
drewjoh / categories.php
Created August 21, 2021 18:13
Apple Podcast Categories
$categories = [
'Arts',
'Arts :: Books',
'Arts :: Design',
'Arts :: Fashion & Beauty',
'Arts :: Food',
'Arts :: Performing Arts',
'Arts :: Visual Arts',
'Business',
'Business :: Careers',
@drewjoh
drewjoh / tailwind.config.js
Created December 30, 2021 17:21
Tailwind Colors for config file
{
slate: {
50: '#F8FAFC',
100: '#F1F5F9',
200: '#E2E8F0',
300: '#CBD5E1',
400: '#94A3B8',
500: '#64748B',
600: '#475569',
700: '#334155',
@drewjoh
drewjoh / AccountContext.js
Created September 1, 2022 13:28 — forked from chrisfosterelli/AccountContext.js
Context Example
import { createContext } from 'react'
export default createContext(null)
@drewjoh
drewjoh / ui-frameworks.md
Last active October 7, 2022 23:32 — forked from manigandham/ui-frameworks.md
UI Frameworks
@drewjoh
drewjoh / example.sh
Created October 27, 2022 12:39
Shell Scripting Template
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
if [[ "${TRACE-0}" == "1" ]]; then
set -o xtrace
fi
if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then