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
#!/bin/bash -uxe | |
VERSION=2.7.14.2717 | |
PACKAGE=ActivePython-${VERSION}-linux-x86_64-glibc-2.12-404899 | |
# make directory | |
mkdir -p /opt/bin | |
cd /opt | |
wget http://downloads.activestate.com/ActivePython/releases/${VERSION}/${PACKAGE}.tar.gz |
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 | |
class LoginAttempt extends ActiveRecord | |
{ | |
const LOGIN_ATTEMPT_LIMIT = 5; // ログイン試行回数のリミット | |
const BANNED_IP_EXPIRATION_TIME = '+1 hour'; // この場合は禁止されてから一時間経たないとログインできない | |
... | |
/** | |
* @see CActiveRecord::beforeSave() | |
*/ |