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 | |
// Include WordPress functionality, replace this path with the actual path to your wp-load.php | |
include('/path/to/wordpress/wp-load.php'); | |
// Color groups in PHP associative array | |
$colorGroups = [ | |
"Black" => ["#000000", "#1a1a1a", "#333333"], | |
"Blue" => ["#0000cc", "#1E90FF", "#4682B4"], | |
"Bronze" => ["#b87333", "#DAA520", "#CD7F32"], | |
"Brown" => ["#8b4513", "#A52A2A", "#D2691E"], |
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
$mysqli = new mysqli('localhost', 'my_user', 'my_password', 'my_db'); | |
if ($mysqli->connect_error) { | |
die('Connect Error (' . $mysqli->connect_errno . ') ' | |
. $mysqli->connect_error); | |
} |
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
# domain: example.com | |
# public: /home/example_user/public/example.com/ | |
<VirtualHost *:80> | |
# Admin email, Server Name (domain name), and any aliases | |
ServerAdmin [email protected] | |
ServerName www.example.com | |
ServerAlias example.com | |
# Index file and Document Root (where the public files are located) |
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
mysql -u root -p | |
create database exampleDB; | |
grant all on exampleDB.* to 'example_user' identified by '5t1ck'; | |
flush privileges; | |
quit |
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
syntax on " Syntax highlighting | |
filetype plugin indent on " Enable filetype-specific plugins | |
set title | |
set laststatus=2 " Always show the statusline | |
set encoding=utf-8 " unicode! | |
"new ********************** | |
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
User-agent: * | |
Disallow: / |
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 | |
$dir = dirname(__FILE__); | |
echo "<p>Full path to this dir: " . $dir . "</p>"; | |
echo "<p>Full path to a .htpasswd file in this dir: " . $dir . "/.htpasswd" . "</p>"; | |
?> |
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 | |
if(isset($_POST['addImage'])) { | |
//echo "<pre>" . print_r($_FILES, true) . "</pre>" ; | |
if(isset($_FILES['gMainImg'])) { | |
$tmpFile = $_FILES["gMainImg"]["tmp_name"]; | |
$fileName = "../images/gallery/" .time(). ".jpg" ; | |
echo getcwd(); |
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></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
<!-- jQuery: Print Page --> | |
$('a.printPage').click(function(){ | |
window.print(); | |
return false; | |
}); | |
<!-- HTML: Print Page --> | |
<div> | |
<a class="printPage" href="#">Print</a> | |
</div> |
NewerOlder