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 | |
/** | |
* 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
#!/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
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
<?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
$.fn.glitchMode = function() { | |
var glitches = { | |
/** | |
* Random color | |
*/ | |
color: function(e) { | |
var color ='#'+Math.random().toString(16).substr(2,6); | |
e.css('color', color ); | |
}, |
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 | |
$config = [ | |
'components' => [ | |
'view' => [ | |
'on afterRender' => function ($event) { | |
// Check if this is not a layout file | |
if( preg_match( '/layouts/', $event->viewFile ) == 0 ) { | |
/** | |
* Add template info. | |
*/ |
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 ($, root, undefined) { | |
/** | |
* Onready – fire when DOM is ready | |
*/ | |
$(function () { | |
'use strict'; | |
// say hello | |
console.log('Hello, Want to hire me? Go to: http://realhe.ro'); |
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
#Global config (always uncommented) | |
$PG_BIN = "C:\Program Files\PostgreSQL\9.6\bin\pg_dump.exe" | |
$PG_HOST=$env:COMPUTERNAME | |
$PG_PORT=5432 | |
$PG_PATH="C:\inetpub\temporary_backups" | |
$ZIP_BIN="C:\Program Files\7-Zip\7z.exe" | |
#---------------------------------------- | |
#Database config for (uncomment if manual use) |