Skip to content

Instantly share code, notes, and snippets.

CJ Thompson cjthomp

Block or report user

Report or block cjthomp

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
View slack-custom.css
:root {
--primary: #09F;
--accent: #57A;
--background: #080808;
--background-elevated: #222;
--background-hover: rgba(255, 255, 255, 0.1);
--sidebar-background: #1a2129;
--border-dim: #666;
cjthomp /
Created Jul 21, 2017
Pushid plugin for SublimeText 3
import sublime, sublime_plugin
import random
import time
class PushidCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.insert(edit, self.view.sel()[0].begin(), PushID().next_id())
class PushID(object):
PUSH_CHARS = ('-0123456789'
cjthomp / nginx.conf
Created Aug 30, 2016 — forked from mreschke/nginx.conf
Nginx config for multiple laravel sites based on /api/v1 url paths
View nginx.conf
# This config will host your main [Laravel] GUI application at /, and any additional [Lumen] webservices at /api/v1 and /api/v2...
# This also works perfectly for all static file content in all projects
# This is full of debug comments so you can see how to print debug output to browser! Took me hours to nail this perfect config.
# Example:
# - Main Laravel site as usual
# - Main Laravel site about page as usual
# - Main Laravel site static content as usual
# - Lumen v1 api default / route
# - Lumen v1 api default / route
cjthomp / google drive
Last active Jun 24, 2017
Google Drive PHP API v2
View google drive
cjthomp /
Created Dec 3, 2015
Laravel Lumen sub-domain routing
$url = parse_url($_SERVER['HTTP_HOST']);
$host = explode('.', $url['path']);
$subdomain = count($host) > 2
        ? implode('.', array_slice($host, 0, count($host)-2))
        : "";
$_SESSION['subdomain'] = $subdomain;

switch ($subdomain)
You can’t perform that action at this time.