Skip to content

Instantly share code, notes, and snippets.

View heatxsink's full-sized avatar
👽
They exist.

Nick Granado heatxsink

👽
They exist.
View GitHub Profile
<?php
require_once('../UrlRewriter.class.php');
$test = UrlRewriter::Transform("/static/js/hello.js");
printf("<h1>%s</h1>", $test);
putenv("ASSETS_HOSTNAME=");
putenv("ASSETS_VERSION=");
$test = UrlRewriter::Transform("/static/js/hello.js");
<?php
/*
*
* Copyright (c) 2010 Nicholas Granado
*
* 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
@heatxsink
heatxsink / gist:582170
Created September 16, 2010 09:20
cookies.php
<?php
function validate_var($var) {
$return_value = false;
if (isset($var) && strlen(trim($var)) > 0) {
$return_value = true;
}
return $return_value;
}
@heatxsink
heatxsink / cookie_test.php
Created September 16, 2010 09:21
cookie_test.php
<?php
class Config {
protected static $instance;
protected function __clone() {
}
public static function get() {
#!/bin/bash
###
#
# Wrap the weird VirtualBox commandline for headless vms
#
###
CMD_HEADLESS=`which VBoxHeadless`;
CMD_MANAGE=`which VBoxManage`;
@heatxsink
heatxsink / glog-example.go
Last active March 25, 2023 06:02
An example of how to use golang/glog.
/*
glog-example
------------
background
---
You probably want to read the source code comments at the top of the glog.go file in
the golang/glog repository on github.com. Located here: https://github.com/golang/glog/blob/master/glog.go
setup

Keybase proof

I hereby claim:

  • I am heatxsink on github.
  • I am heatxsink (https://keybase.io/heatxsink) on keybase.
  • I have a public key whose fingerprint is C7CA 6D79 56CF A5E7 8D96 22BD DBB1 D5D9 9B50 0CF9

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am heatxsink on github.
  • I am heatxsink (https://keybase.io/heatxsink) on keybase.
  • I have a public key ASCWHH1X4cdGAyIBJWfl4ZhinYAvEXPeo6X3aoz2TEWNnQo

To claim this, I am signing this object:

@heatxsink
heatxsink / service-checklist.md
Last active July 21, 2020 00:47 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?