Skip to content

Instantly share code, notes, and snippets.

View claylo's full-sized avatar

Clay Loveless claylo

View GitHub Profile
@claylo
claylo / PHP-Docblock-Newline.txt
Created September 28, 2022 00:10
PHP Docblock Newline - for TextMate & TextMate 2
${TM_CURRENT_LINE/(.*\*\/$)|.*?(\/\*(?!.*\*\/)).*|.*/(?1:
:
(?2: )* )/}
@claylo
claylo / keybase.md
Created February 3, 2020 13:29
keybase proof, like it says

Keybase proof

I hereby claim:

  • I am claylo on github.
  • I am claylo (https://keybase.io/claylo) on keybase.
  • I have a public key ASDwYDs9hW-SaOgepLdts04yxxVpFXYHklI21IjF9GHhzQo

To claim this, I am signing this object:

@claylo
claylo / # hhvm - 2016-10-09_20-03-18.txt
Created October 10, 2016 03:25
hhvm (hhvm/hhvm/hhvm) on macOS 10.11.6 - Homebrew build logs
Homebrew build logs for hhvm/hhvm/hhvm on macOS 10.11.6
Build date: 2016-10-09 20:03:18
@claylo
claylo / onename.txt
Created January 12, 2016 12:27
onename
Verifying that +claylo is my blockchain ID. https://onename.com/claylo
@claylo
claylo / SignatureV2.php
Created November 20, 2012 13:44
SignatureV2
<?php
/**
* Copyright 2010-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
@claylo
claylo / gist:3667348
Created September 7, 2012 15:51
Are we there yet?
#!/bin/bash
# The author releases this code into the public domain.
# requires 'say' command. OS X is your friend
RANGE=90
LOOPS=10
count=0
# Thanks, interwebs!
# http://rosettacode.org/wiki/Pick_random_element#Bash
rand() {
@claylo
claylo / phpunit-composer-install.log
Created August 15, 2012 22:26
Log of installing PHPUnit via composer
clay:test clay$ cat composer.json
{
"name": "test/test",
"require": {
"phpunit/phpunit": "3.6.*"
},
"repositories": [
{ "type": "pear", "url": "http://pear.symfony-project.com" },
{ "type": "git", "url": "http://github.com/claylo/phpunit.git" },
{ "type": "git", "url": "http://github.com/claylo/dbunit.git" },
@claylo
claylo / foo
Created June 14, 2011 03:26
My Routed Controller
<?php
// Wow, we know what controller to use!
require_once 'MyApp/Controllers/Foo.php';
// handle your HTTP Methods inside your controller
$app = new MyApp_Controllers_Foo();
$app->run();
@claylo
claylo / vhost.conf
Created June 14, 2011 03:25
Apache example configs for RESTful "routing"
# for you mod_php5 fans
<VirtualHost *:80>
# ...
<LocationMatch "^/(foo|bar|baz)/.*$">
ForceType application/x-httpd-php
</LocationMatch>
</VirtualHost>
# for the PHP-FPM lovers
<VirtualHost *:80>
@claylo
claylo / hello.php
Created June 8, 2011 17:01
Very simple PHP v Python comparison
<?php
function hello_world() {
// a world subset
$countries = array('USA', 'Germany', 'Spain', 'Austraila');
print_r($countries);
}