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 | |
/* | |
* @Changing collation of database, tables and columns | |
* @Run this script only at your own risk. If you have a big database | |
* @you need to change the script execution time in your php | |
* @copyright (C) Jan Pavelka www.phoca.cz | |
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL | |
* @based on script from http://php.vrana.cz/ - Author - Jakub Vrana | |
* @license http://creativecommons.org/licenses/by/2.5/ | |
* @Creative Commons Attribution 2.5 Generic |
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 to script: /path_to_git_repo/.git/hooks/pre-commit | |
#DB Details | |
DBHOST=localhost | |
DBUSER=myuser | |
DBPASS=mypass | |
DBNAME=test_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 | |
$y = date('Y'); | |
$m = date('m'); | |
$d = date('d'); | |
$restrictStart = mktime(0, 30, 0, $m, $d, $y); | |
$restrictEnd = mktime(1, 30, 0, $m, $d, $y); | |
$time = time(); | |
if ($time < $restrictStart || $time > $restrictEnd) { | |
die('not yet!'); |
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
<div class="wrap"> | |
<h1>My Plugin Admin Page</h1> | |
<h2 class="nav-tab-wrapper"> | |
<a class="nav-tab nav-tab-active" href="#tab1">Tab 1</a> | |
<a class="nav-tab" href="#tab2">Tab 2</a> | |
</h2> | |
<div id="tab1"> | |
<h3>Tab 1 Content</h3> |
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 | |
/** | |
* Total Length: 12 digits | |
* [1][2002][0012345] | |
* | | | | |
* | | -> Random: 7 digits | |
* | -> Birth Year: 4 digits | |
* -> Gender 1 male / 2 female: 1 digit | |
*/ |
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
#Add at the top after # .bashrc | |
[ -z "$PS1" ] && return | |
#Add at the bottom | |
alias mycomposer="/usr/bin/php-cli -d suhosin.executor.include.whitelist=phar /home/userdir/bin/composer.phar" |
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 | |
$pages = 22; | |
$current = 1; | |
if (isset($_GET['p'])) { | |
$current = filter_var($_GET['p'], FILTER_SANITIZE_NUMBER_INT); | |
} | |
$maxShow = 10; | |
$start = 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 resetSameTopElmsHeight(container, childSelector) { | |
var cols, ph, pt, tempElms, i, ch, co, j; | |
cols = container.find(childSelector); | |
ph = -1; | |
pt = -1; | |
tempElms = []; | |
for (i in cols) { | |
ch = $(cols[i]).outerHeight(); |
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
MY_KEY=key1|value1,key2|value2 |
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 | |
// Use command line in generate.sh | |
// Generation code line by line | |
include __DIR__ . "/vendor/autoload.php"; | |
include __DIR__ . "/bootstrap/app.php"; | |
// Check https://github.com/laravel/framework/blob/8.x/src/Illuminate/Foundation/Console/KeyGenerateCommand.php | |
$key = "base64:" . base64_encode(Illuminate\Encryption\Encrypter::generateKey(config("app.cipher"))); |
OlderNewer