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 | |
| /** | |
| * @param resource $inotify_instance | |
| * @param string $pathname | |
| * @param int $mask | |
| * @return int[] watcher descriptors | |
| */ | |
| function inotify_add_watch_recursive ($inotify, $path, $mask) | |
| { |
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
| SELECT table, | |
| formatReadableSize(sum(bytes)) as size, | |
| min(min_date) as min_date, | |
| max(max_date) as max_date | |
| FROM system.parts | |
| WHERE active | |
| GROUP BY table |
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 | |
| // This file walks you through the most common features of PHP's SQLite3 API. | |
| // The code is runnable in its entirety and results in an `analytics.sqlite` file. | |
| // Create a new database, if the file doesn't exist and open it for reading/writing. | |
| // The extension of the file is arbitrary. | |
| $db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE); | |
| // Errors are emitted as warnings by default, enable proper error handling. |
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/bash | |
| ############################################## | |
| #from http://zeromq.org/intro:get-the-software | |
| ############################################## | |
| #get zeromq | |
| wget http://download.zeromq.org/zeromq-4.0.5.tar.gz | |
| #unpack tarball package |
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 | |
| class RobustPDO extends PDO | |
| { | |
| /** Call setAttribute to set the session wait_timeout value */ | |
| const ATTR_MYSQL_TIMEOUT = 100; | |
| /** @var array */ | |
| protected $config = []; | |
| /** @var bool For lazy connection tracking */ |
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
| $('table.arrow-nav').keydown(function(e){ | |
| var $table = $(this); | |
| var $active = $('input:focus,select:focus',$table); | |
| var $next = null; | |
| var focusableQuery = 'input:visible,select:visible,textarea:visible'; | |
| var position = parseInt( $active.closest('td').index()) + 1; | |
| console.log('position :',position); | |
| switch(e.keyCode){ | |
| case 37: // <Left> | |
| $next = $active.parent('td').prev().find(focusableQuery); |