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 | |
const SESSION_EXPIRATION_TIME = 100; // Seconds | |
function session_expire() | |
{ | |
if (empty($_SESSION['last_visit'])) { | |
$_SESSION['last_visit'] = time(); | |
} | |
if ($_SESSION['last_visit'] + SESSION_EXPIRATION_TIME < time()) { |
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 python3 | |
import argparse | |
import subprocess | |
import time | |
import select | |
PATH_TO_TELEGRAM = '/root/tg/telegram' |
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
// | |
// GameCCPhysicsNode.h | |
// RollingCandy | |
// | |
// Created by Gints Murans on 21/03/14. | |
// Copyright (c) 2014 Early Bird. All rights reserved. | |
// | |
#import "CCPhysicsNode.h" |
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
// | |
// PEShapeCache.h | |
// | |
// Put together form the sources all over the internet by Gints Murans. | |
// No guarantees, of course. | |
// | |
/* | |
This class is used to load physics shapes from a plist created by the |
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
#!/bin/bash | |
bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
bN=$(echo $bN + 1 | bc) | |
bN=${bN/\.*} | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $bN" "$INFOPLIST_FILE" |
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
@interface NSMutableArray (Custom) | |
- (NSMutableArray *)replaceNullsWithObject:(id)object; | |
@end | |
@interface NSMutableDictionary (Custom) | |
- (NSMutableDictionary *)replaceNullsWithObject:(id)object; | |
@end |
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 handler | |
function custom_error_handler($errno, $errstr, $errfile, $errline) | |
{ | |
if (AppSettings::$env == 'dev') | |
{ | |
throw new ErrorException($errstr, 0, $errno, $errfile, $errline); | |
} | |
else |
NewerOlder