function Intialize() {
return;
}
function Install() {
ScriptApp.newTrigger("purgeGmail")
.timeBased().everyMinutes(10).create();
This file contains 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
Array functions: | |
array_search $needle, $haystack | |
in_array $needle, $haystack | |
String functions: | |
strchr $haystack, $needle | |
stripos $haystack, $needle | |
stristr $haystack, $needle | |
strpos $haystack, $needle | |
strrchr $haystack, $needle |
This file contains 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
/* | |
* This clears the LESS.js cache, since it aggressively caches @import statements. | |
* Credit: Attaboy, https://gist.github.com/attaboy/1346280 | |
* Additional key checks and debugging output by A.B. Carroll. (http://github.com/nezzario) | |
* License: Assumed MIT/BSD-like license, please give credit where credit is due. | |
*/ | |
less.env = 'development'; | |
console.log("If you are seeing this in a production environment you are likely doing something wrong or forgot to remove the destroyLessCache() script."); |
This file contains 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" ) |\ |
This file contains 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 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
#include <stdio.h> | |
#include <iostream> | |
#include <thread> | |
#include <list> | |
#include <sapi/embed/php_embed.h> | |
int main(int argc, char* argv[]) { | |
PHP_EMBED_START_BLOCK(argc, argv) |
Hi:
perl -e 'print "hello world!\n"'
A simple filter:
perl -ne 'print if /REGEX/'
Filter out blank lines (in place):
This file contains 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
# LVDB - LLOOGG Memory DB | |
# Copyriht (C) 2009 Salvatore Sanfilippo <[email protected]> | |
# All Rights Reserved | |
# TODO | |
# - cron with cleanup of timedout clients, automatic dump | |
# - the dump should use array startsearch to write it line by line | |
# and may just use gets to read element by element and load the whole state. | |
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |
This file contains 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
# LVDB - LLOOGG Memory DB | |
# Copyriht (C) 2009 Salvatore Sanfilippo <[email protected]> | |
# All Rights Reserved | |
# TODO | |
# - cron with cleanup of timedout clients, automatic dump | |
# - the dump should use array startsearch to write it line by line | |
# and may just use gets to read element by element and load the whole state. | |
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |
OlderNewer