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
| sub alphanumeric_increment { | |
| my $string = "" . shift; | |
| my $position = @_ ? shift : -1; | |
| if ($position == -1) { | |
| $position = (length $string) - 1; | |
| } | |
| my $increment_str = substr $string, $position, 1; |
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
| function alphanumeric_increment( $string, $position=false ) { | |
| if ( false === $position ) { | |
| $position = strlen( $string ) - 1; | |
| } | |
| $increment_str = substr( $string, $position, 1 ); | |
| switch ( $increment_str ) { | |
| case '9': | |
| $string = substr_replace( $string, 'a', $position, 1 ); | |
| break; | |
| case 'z': |
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
| #pragma compile(FileDescription, SimulatedMediaKeys simulates media keys) | |
| #pragma compile(ProductName, SimulatedMediaKeys) | |
| #pragma compile(ProductVersion, 0.1) | |
| #pragma compile(FileVersion, 0.0.0.1) | |
| HotKeySet("^!{NUMPAD8}", "MediaPlay") | |
| HotKeySet("^!{NUMPAD6}", "MediaNext") | |
| HotKeySet("^!{NUMPAD4}", "MediaPrev") | |
| HotKeySet("^!{NUMPAD5}", "MediaStop") |
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 | |
| /** | |
| * Migration | |
| */ | |
| abstract class Migration | |
| { | |
| protected $db; | |
| protected $dbName; |
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 | |
| define('APP_ROOT_ABS', realpath(__DIR__)); # /var/www/html/images | |
| define('APP_ROOT_REL', preg_replace('/^' . preg_quote($_SERVER['DOCUMENT_ROOT'], '/') . '/', '', __DIR__)); # /images |
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 | |
| // before any other route | |
| Flight::route('*', function () { | |
| $request = Flight::request(); | |
| if ($request->url != '') { | |
| list($base, $query) = array_pad(explode('?', $request->url, 2), 2, null); | |
| if (substr($base, -1) == '/' && strlen($base) > 1) { | |
| $url = rtrim($base, '/'); | |
| if ($query !== null) { | |
| $url .= '?' . $query; |
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
| /* | |
| ** Zabbix | |
| ** Copyright (C) 2001-2015 Zabbix SIA | |
| ** | |
| ** This program is free software; you can redistribute it and/or modify | |
| ** it under the terms of the GNU General Public License as published by | |
| ** the Free Software Foundation; either version 2 of the License, or | |
| ** (at your option) any later version. | |
| ** | |
| ** This program is distributed in the hope that it will be useful, |