Skip to content

Instantly share code, notes, and snippets.

View taftse's full-sized avatar

Timothy Seebus taftse

  • Tools4Schools
  • Dublin Ireland
View GitHub Profile
{
"name": "mmollick/github-team-repos",
"authors": [
{
"name": "Mike Mollick",
"email": "mollick2@gmail.com"
}
],
"require": {
"guzzlehttp/guzzle": "^7.0"
@taftse
taftse / S3-Static-Sites.md
Created May 4, 2020 09:47 — forked from bradwestfall/S3-Static-Sites.md
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation

Resources

@taftse
taftse / login_controller.php
Last active April 27, 2019 21:55
sample login controller
<?php
namespace App\Http\Controllers;
use App\Models\Subscriber;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Support\Facades\Hash;
@taftse
taftse / README.md
Created February 22, 2017 16:42 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@taftse
taftse / Oauth2Controller.php
Last active August 29, 2015 13:57
Oauth2Server Controller example
<?php namespace Controllers\Api;
class Oauth2Controller extends \Controllers\BaseController
{
public function index()
{
\Camelot::authenticate(\Input::all());
}
@taftse
taftse / gist:1173422
Created August 26, 2011 13:39
determine_age_from_dob
<?php
public function determine_age_from_dob ($YYYYMMDD_In)
{
// Parse Birthday Input Into Local Variables
// Assumes Input In Form: YYYYMMDD
$yIn=substr($YYYYMMDD_In, 0, 4);
$mIn=substr($YYYYMMDD_In, 4, 2);
$dIn=substr($YYYYMMDD_In, 6, 2);
@taftse
taftse / gist:1173418
Created August 26, 2011 13:38
time_past
<?php
public function time_past($time, $opt = array()) {
// The default values
$defOptions = array(
'to' => time(),
'parts' => 1,
'precision' => 'minute',
'distance' => TRUE,
'separator' => ', '