function Intialize() {
return;
}
function Install() {
ScriptApp.newTrigger("purgeGmail")
.timeBased().everyMinutes(10).create();
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!function_exists('interface_exists')) { | |
die('PHP version too old'); | |
} | |
$throwables = listThrowableClasses(); | |
$throwablesPerParent = splitInParents($throwables); | |
printTree($throwablesPerParent); | |
if (count($throwablesPerParent) !== 0) { | |
die('ERROR!!!'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tc\Std; | |
// Define these as descendands of \Exception or whaever | |
use Tc\Std\Exception\DateTimeInvalidArgument; | |
use Tc\Std\Exception\DateTimeUnexpectedResult; | |
abstract class DateTimeUtil | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Or, to put it another way | |
function runLoader() { | |
$position = queryAndFetch("SELECT * FROM `chat_msg_history_positions` WHERE `positionName` = 'maxChatHistoryId'") | |
if($position === null) { | |
runFullLoad(); | |
} else { | |
runIncrementalLoad($position) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(-1); | |
ini_set('display_errors', true); | |
$savedValues = []; | |
$searchForVariableNames = ['$MetaKeys', '$MetaDesc']; | |
foreach(['test2.php', 'test3.php'] as $filename) { | |
$srcText = file_get_contents($filename); | |
$tokens = token_get_all($srcText); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$states = array( | |
'AL' => 'America/Chicago', | |
'AK' => 'America/Anchorage', | |
'AZ' => 'America/Phoenix', | |
'AR' => 'America/Chicago', | |
'CA' => 'America/Los_Angeles', | |
'CO' => 'America/Denver', | |
'CT' => 'America/New_York', | |
'DE' => 'America/New_York', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
# Specify the merge type every time... all the time | |
merge_type: 'list(append)+dict(recurse_array)+str()' | |
# Update apt | |
apt_update: true | |
apt_upgrade: true | |
apt_reboot_if_required: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Warning Icon</title> | |
</head> | |
<body> | |
<!-- Taken from wikipedia commons, free for commercial use --> | |
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAABqpJREFUeNrtnV2IlUUYx3+6mK2WhZnYl7lqpmZ7EeJNWIiWrh+pURlpWBlUehEkhlmpWVpGmoR9Qd2ElaClrrZRkWUWhRVYkGZpuWqmkVlJmrpaF+8rnJZzTu/M+zHznvP/wVztMs+z88ye8ztzZuYFIYQQQgghhBBCCCGEEEIIIYQQQgghhMg75wODgGFhGwScp2GpXLoC9wDrgN+Af0q0A8Ba4G6gi4Yt//QHlgHHyhS9VDsKvAJcqmHMH52AZ4EWi8K3bi3AM8AZGtZ8cCWwK4HCt24/hq4gPGaK5cu9ydvCJA2zn0xPsfCF7SQwTcPtF3dlVPzCNlnD7gfXJiR7pu0YcJWG3/2Czq8Oin+q7QvXGIQj3nFY/FNtjcrghokxirYFWARMDdtiYGuM/m5QObLlrPDl17RQW0NnKMUIYJtFv7uBjipLdiyxKNLrQG2EvjsCKy36X6iyZEO9hfUvA9oYxGgLLLf4VNBX5UmfjwwL8ylwmkWc9sAXhrHeU3nS5VbDgvwF9IwRrw9wxDDmTSqTP+I3K4G4syWE+RS/bZYv/a05HdghIcyf+A1PMP4oCWG+xO+NFHJolBDmR/y6p5BHnYUQ3qjyxaMT8LMD8SvFHAmh3+L3XULiJyH0gMsdi18pRksI/RS/NzPMba2EsDrET0KYE/F70KD/tgTHwRYAr4ZtPjA0/FlU5koI8yd+DeHvl+rrW8rvF4grhE+ovO7EbybRt33PiNjnGAlhPsT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Warning Icon</title> | |
</head> | |
<body> | |
<!-- Taken from wikipedia commons, free for commercial use --> | |
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAABqpJREFUeNrtnV2IlUUYx3+6mK2WhZnYl7lqpmZ7EeJNWIiWrh+pURlpWBlUehEkhlmpWVpGmoR9Qd2ElaClrrZRkWUWhRVYkGZpuWqmkVlJmrpaF+8rnJZzTu/M+zHznvP/wVztMs+z88ye8ztzZuYFIYQQQgghhBBCCCGEEEIIIYQQQgghhMg75wODgGFhGwScp2GpXLoC9wDrgN+Af0q0A8Ba4G6gi4Yt//QHlgHHyhS9VDsKvAJcqmHMH52AZ4EWi8K3bi3AM8AZGtZ8cCWwK4HCt24/hq4gPGaK5cu9ydvCJA2zn0xPsfCF7SQwTcPtF3dlVPzCNlnD7gfXJiR7pu0YcJWG3/2Czq8Oin+q7QvXGIQj3nFY/FNtjcrghokxirYFWARMDdtiYGuM/m5QObLlrPDl17RQW0NnKMUIYJtFv7uBjipLdiyxKNLrQG2EvjsCKy36X6iyZEO9hfUvA9oYxGgLLLf4VNBX5UmfjwwL8ylwmkWc9sAXhrHeU3nS5VbDgvwF9IwRrw9wxDDmTSqTP+I3K4G4syWE+RS/bZYv/a05HdghIcyf+A1PMP4oCWG+xO+NFHJolBDmR/y6p5BHnYUQ3qjyxaMT8LMD8SvFHAmh3+L3XULiJyH0gMsdi18pRksI/RS/NzPMba2EsDrET0KYE/F70KD/tgTHwRYAr4ZtPjA0/FlU5koI8yd+DeHvl+rrW8rvF4grhE+ovO7EbybRt33PiNjnGAlhPsT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
URL="http://a0.awsstatic.com/pricing/1/ec2/ri-v2/linux-unix-shared.min.js" | |
echo -e "1S- = Std 1 Year Term \t3S- = Std 3 Year Term\t3C- = Convertibe 3 Year Term" | |
echo -e " -NON = No Up Front Cost\t -PRT = Partially Upfront\t -ALL = Entire Term Upfront" | |
echo "" | |
echo -e "Instance\tONDMND\t1S-NON\t1S-PRT\t1S-ALL\t3S-PRT\t3S-ALL\t3C-NON\t3C-PRT\t3C-ALL\n" | |
(echo 'function callback(data) { console.log(JSON.stringify(data)); }'; curl -s "$URL" ) |\ |