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 | |
date_default_timezone_set('America/Los_Angeles'); | |
session_start(); | |
include("ratelimiter.php"); | |
// in this sample, we are using the originating IP, but you can modify to use API keys, or tokens or what-have-you. | |
$rateLimiter = new RateLimiter($_SERVER["REMOTE_ADDR"]); | |
$limit = 100; // number of connections to limit user to per $minutes | |
$minutes = 1; // number of $minutes to check for. |
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 | |
// based on: http://pe.usps.gov/text/pub28/28apc_002.htm | |
$usps_abbreviations = [ | |
'ALLEY' => 'ALY', | |
'ANNEX' => 'ANX', | |
'ARCADE' => 'ARC', | |
'AVENUE' => 'AVE', | |
'BAYOO' => 'BYU', | |
'BEACH' => 'BCH', |
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
{ | |
"name": "fish.pufferfish.raw", | |
"id": 206, | |
"icon": "fish_raw_puffer_fish", | |
"use_animation": "eat", | |
"use_duration": 32, | |
"max_damage": 0, | |
"stacked_by_data": true, | |
"food": { |
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
<script type="text/javascript"> | |
function idleTimer() { | |
var t; | |
//window.onload = resetTimer; | |
window.onmousemove = resetTimer; // catches mouse movements | |
window.onmousedown = resetTimer; // catches mouse movements | |
window.onclick = resetTimer; // catches mouse clicks | |
window.onscroll = resetTimer; // catches scrolling | |
window.onkeypress = resetTimer; //catches keyboard actions |
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 "base94.h" | |
void base94_encode(const unsigned char *plain, unsigned char *code) { | |
// high * 2^64 | low | |
unsigned long long value | |
= ((unsigned long long)plain[1] << 56) | ((unsigned long long)plain[2] << 48) | |
| ((unsigned long long)plain[3] << 40) | ((unsigned long long)plain[4] << 32) |