Skip to content

Instantly share code, notes, and snippets.

View ktwbc's full-sized avatar

Kris Thom White ktwbc

  • Plano, TX
  • 07:07 (UTC -05:00)
View GitHub Profile
@ktwbc
ktwbc / gist:3320da9c168055d80cf6478e51b9dfaa
Created September 24, 2020 17:54
a gist of getting a gist.. very meta
{{ $urlPre := "https://api.github.com" }}
{{ $gistJ := getJSON $urlPre "/users/ktwbc/gists" }}
{{ range first 5 $gistJ }}
{{ if .public }}
<li><a href="{{ .html_url }}" target="_blank">{{ .description }}</a></li>
{{ end }}
{{ end }}
interface RequestInfo {
readonly httpMethod: string;
readonly url: string;
readonly sessionId: string;
readonly requestId: number | string;
readonly start: number;
}
const logRequestStart = (r: RequestInfo) => {
const lines = [
@ktwbc
ktwbc / StreamingManager.php
Created August 3, 2015 15:12
manual cache example
$cacheKey = "smilData" .$id;
$obj = $this->r2Cache->get($cacheKey);
if (!$obj) {
//Heigh Ho, Heigh Ho, off to the Database we go...
/** @var CoverageLive $objChannel */
$objChannel = $this->repoCoverageLive->find($id);
$obj = $objChannel->getSmil();