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 RoboFile extends \Robo\Tasks | |
| { | |
| function dbbackup($resultFile = "mysqldump.sql") | |
| { | |
| $server = $this->taskExec("presh constant _DB_SERVER_")->printed(false)->run()->getOutputData(); | |
| $user = $this->taskExec("presh constant _DB_USER_")->printed(false)->run()->getOutputData(); | |
| $name = $this->taskExec("presh constant _DB_NAME_")->printed(false)->run()->getOutputData(); |
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 PolishHoliday{ | |
| private function holidaysStatic(){ | |
| $holiday = array(); | |
| $holiday["new_years_eve"] = array("date" => array("m"=>1, "d"=>1), "name" => "New Year's Eve" ); | |
| $holiday["epiphany"] = array("date" => array("m"=>1, "d"=>6) , "name" => "Epiphany" ); | |
| $holiday["labor_day"] = array("date" => array("m"=>5, "d"=>6), "name" => "Labor Day / May Day" ); |
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 | |
| /* | |
| * example usage: php parse.php --file="de\data\country.xml" --lang=de --prefix=ps_ | |
| * generates imports country translations in DE lang | |
| */ | |
| $options = getopt(null, array( | |
| "file:", // Required | |
| "prefix::", // Optional | |
| "lang::" // Required |
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 | |
| /* | |
| * Should be placed in \override\controllers\admin\AdminAddressesController.php | |
| * remember to delete cache\class_index.php | |
| */ | |
| class AdminAddressesController extends AdminAddressesControllerCore | |
| { | |
| public function __construct() |
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 getElementByXpath(path) { | |
| return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
| } | |
| console.log( getElementByXpath("//html[1]/body[1]/div[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
| @media(max-width: @screen-xs-max){} | |
| @media(min-width: @screen-sm-min){} /* deprecated: @screen-tablet, or @screen-sm */ | |
| @media(min-width: @screen-md-min){} /* deprecated: @screen-desktop, or @screen-md */ | |
| @media(min-width: @screen-lg-min){} /* deprecated: @screen-lg-desktop, or @screen-lg */ |
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
| CREATE TABLE `log` ( | |
| `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, | |
| `message` TEXT NULL, | |
| `level` ENUM('error','warn','info','debug','trace') NULL DEFAULT 'info', | |
| `class` VARCHAR(20) NULL DEFAULT NULL, | |
| `date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
| PRIMARY KEY (`id`) | |
| ) | |
| COLLATE='latin1_swedish_ci' | |
| ENGINE=InnoDB |
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 read_query(packet) | |
| if string.byte(packet) == proxy.COM_QUERY then | |
| query = string.sub(packet, 2) | |
| log_query(query) | |
| end | |
| end | |
| function log_query(query) | |
| output = os.date() .. ";QUERY;" .. query | |
| print(output) |
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
| -- all-hooks.lua | |
| local access_ndx = 0 | |
| function read_auth( auth ) | |
| print_access ('inside read_auth ') | |
| end | |
| function connect_server() | |
| print_access ('inside connect_server') | |
| end | |
| function read_handshake( auth ) | |
| print_access ('inside read_handshake' ) |
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
| /* | |
| !.gitignore | |
| !wp-content/ | |
| *.7z | |
| *.dmg | |
| *.gz | |
| *.iso | |
| *.jar | |
| *.rar |