Skip to content

Instantly share code, notes, and snippets.

View gcphost's full-sized avatar

William gcphost

View GitHub Profile
@d4goxn
d4goxn / s-function.json
Created May 9, 2016 15:58
Serverless CloudFormation config for Elasticache Redis server
{
"name": "showConfig",
"runtime": "nodejs",
"description": "Returns Redis host and Serverless stage",
"handler": "redis/showConfig/handler.handler",
"timeout": 6,
"memorySize": 256,
"custom": {
"optimize": true
},
@gcphost
gcphost / LICENSE
Last active March 26, 2016 21:35
Laravel 5 PHPUnit SeeOrSaveJsonStructure Trait to automatically save json results then validate them.
The MIT License (MIT)
Copyright (c) 2016 William Bowman (gcphost@gmail.com, asked.io)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@jatubio
jatubio / .php_cs
Created June 13, 2015 11:51
Config file to pass PHP-CS-Fixer with Laravel 5.1 custom and PSR-2 styles coding
<?php
$finder = Symfony\Component\Finder\Finder::create()
->notPath('bootstrap/cache')
->notPath('storage')
->notPath('vendor')
->in(__DIR__)
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
@six0h
six0h / post-update
Created February 26, 2014 17:12
Git Post-Update hook that checks for changes to composer.lock, and fires a composer install if required.
#!/usr/bin/env python
#-*- coding: utf-8 -*-
"""A post-update Git hook to execute `composer install` when composer.json changes
:Author: Cody Halovich
:Company: HootSuite Media Inc.
"""
import subprocess
@fxsjy
fxsjy / SimpleAuthServer.py
Created April 26, 2013 06:23
SimpleAuthServer: A SimpleHTTPServer with authentication
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
import sys
import base64
key = ""
class AuthHandler(SimpleHTTPRequestHandler):
''' Main class to present webpages and authentication. '''
def do_HEAD(self):