Skip to content

Instantly share code, notes, and snippets.

View GeeH's full-sized avatar

Gary Hockin GeeH

View GitHub Profile
--- incoming function ---
const got = require('got');
exports.handler = function(context, event, callback) {
let twiml = new Twilio.twiml.MessagingResponse();
const message = event.Body;
const url = 'https://geeh.ngrok.io?move=' + message;
<div class="flex items-start w-full">
<?php /** @var App\Person $person */ ?>
@foreach($people as $person)
<div class="flex flex-col w-64 m-2 bg-white border border-2 rounded shadow-md">
<div class="font-semibold bg-gray-200 text-gray-700 py-3 px-6 mb-0">
{{ $person->name }}
</div>
<div class="w-full p-6">
<p class="text-gray-700">
{{ $person->timezone }}
_artisan()
{
COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
COMMANDS=`php artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"`
COMPREPLY=(`compgen -W "$COMMANDS" -- "${COMP_WORDS[COMP_CWORD]}"`)
return 0
}
complete -F _artisan art
complete -F _artisan artisan
@GeeH
GeeH / sheets.php
Created August 30, 2019 09:34
google sheets access in php
<?php declare(strict_types=1);
require('vendor/autoload.php');
$client = new Google_Client();
$client->setApplicationName('My Application');
$client->setScopes(Google_Service_Sheets::SPREADSHEETS);
$client->setAccessType('offline');
// renamed credentials file you downloaded when you created your credentials from Google Admin
@GeeH
GeeH / quote.md
Created September 12, 2016 10:18

These words in this order just make no sense to me. Computers themselves never would be under any kind of license. I'm not sure if Mr Doyle is implying that everything that is produced on that computer would be covered by an open source license -- it's one of the interpretations of this gibberish I suppose. I have an open source project open in another window as I'm writing this piece, but that doesn't mean I need to release this scathing quote under an MIT license and invite contributions (although I might).

<?php
namespace ZendBench\ServiceManager;
use ProxyManager\Factory\LazyLoadingValueHolderFactory;
use Zend\ServiceManager\Proxy\LazyServiceFactory;
use ZendTest\ServiceManager\TestAsset\ComplexDependencyObject;
use ZendTest\ServiceManager\TestAsset\FailingFactory;
use ZendTest\ServiceManager\TestAsset\InvokableObject;
use ZendTest\ServiceManager\TestAsset\SimpleDependencyObject;
<?php
namespace App;
use App\Action\HomePageAction;
use App\Action\HomePageFactory;
use App\Action\PingAction;
use Zend\Expressive\Router\FastRouteRouter;
use Zend\Expressive\Router\RouterInterface;
<?php
namespace App\Action;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Zend\Diactoros\Response\JsonResponse;
class PingAction
{
@GeeH
GeeH / tips.md
Created June 22, 2016 08:16
43 PhpStorm Tips for Lazy People

I'm a lazy, lazy, developer. I am waaaaay too lazy not to use an IDE with code completion, refactoring tools and step-debugging (and much much more). PhpStorm is the best IDE (in my opinion) to help lazy developers get stuff done quickly and correctly.

Prepare yourself for a fast paced look at 43 tips and tricks for PhpStorm, some that you may never even know existed. Note taking equipment is strongly advised.

@GeeH
GeeH / tips.md
Created June 22, 2016 08:16
43 PhpStorm Tips for Lazy People

I'm a lazy, lazy, developer. I am waaaaay too lazy not to use an IDE with code completion, refactoring tools and step-debugging (and much much more). PhpStorm is the best IDE (in my opinion) to help lazy developers get stuff done quickly and correctly. Prepare yourself for a fast paced look at 43 tips and tricks for PhpStorm, some that you may never even know existed. Note taking equipment is strongly advised.