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 | |
| /** @constant string THEME_NAME **/ | |
| define( 'THEME_NAME', get_option('stylesheet') ); | |
| /** | |
| * Custom script | |
| */ | |
| function my_scripts_method() { | |
| wp_enqueue_script( | |
| 'custom-script', |
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
| module.exports = function (grunt) { | |
| grunt.initConfig({ | |
| /** | |
| * Prepare banner. | |
| * This will be used as header for generated files. | |
| */ | |
| pkg: grunt.file.readJSON('package.json'), | |
| banner: '/*! <%= pkg.name %> - v<%= pkg.version %> ' + '<%= grunt.template.today("yyyy-mm-dd h:MM:ss") %>' + '*/' + "\n", | |
| /* Minify html */ |
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/sh | |
| # Path | |
| result=${PWD##*/} | |
| # Current date | |
| now=$(date +"%d_%m_%Y") | |
| machine=$(hostname) | |
| # Database credentials |
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 | |
| /** | |
| * Long file download tester. | |
| * You can test very long file downloads using PHP. | |
| */ | |
| ob_start(); | |
| /** | |
| * Settings | |
| */ |
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 | |
| /** | |
| * Benchmark | |
| * | |
| * @category debug | |
| */ | |
| public function benchmark() { | |
| /** @var integer $timeStart **/ | |
| $timeStart = microtime(true); | |
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 | |
| /** @var array $params Current get params without c **/ | |
| $params = $_GET; | |
| unset( $params[ 'c' ] ); | |
| /** @var string $url **/ | |
| $url = Yii::app()->controller->createUrl( Yii::app()->controller->id . '/' . Yii::app()->controller->action->id, $params ); | |
| /** | |
| * Create form with nedded c param included. |
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
| /** | |
| * Arduino USB HID Keyboard Demo | |
| * Keys 1, 2, 3 and 4 on pins 4, 5, 6 and 7 | |
| * | |
| * @info check details on my website | |
| * @link http://blog.realhe.ro | |
| */ | |
| uint8_t buf[8] = { | |
| 0 }; /* Keyboard report buffer */ |
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
| psql -c "SELECT pg_database.datname, pg_database_size(pg_database.datname), pg_size_pretty(pg_database_size(pg_database.datname)) FROM pg_database ORDER BY pg_database_size DESC;" -d <db_name> <db_user> |
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
| <rules> | |
| <clear /> | |
| <rule name="Protect WP" stopProcessing="true"> | |
| <match url="(readme.html)|(xmlrpc.php)" /> | |
| <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> | |
| <action type="Redirect" url="https://youtu.be/Ww0k-80n-zI" /> | |
| </rule> | |
| </rules> |