Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
<?php | |
/** | |
* Get hearder Authorization | |
* */ | |
function getAuthorizationHeader(){ | |
$headers = null; | |
if (isset($_SERVER['Authorization'])) { | |
$headers = trim($_SERVER["Authorization"]); | |
} | |
else if (isset($_SERVER['HTTP_AUTHORIZATION'])) { //Nginx or fast CGI |
/* The loading Class */ | |
.loading { | |
position: relative; | |
background-color: #e2e2e2; | |
} | |
/* The moving element */ | |
.loading::after { | |
display: block; | |
content: ""; |
<?php | |
//grepper php normalize whitespace characters | |
function normalizeWhitespaceCharacters( $string ) | |
{ | |
$stepOne = htmlentities($string); | |
$stepTwo = trim(preg_replace('/( )+|\s\K\s+/','', $stepOne)); | |
$final = html_entity_decode($stepTwo); | |
return $final; | |
} |
<?php | |
require('markdown_limited.php'); | |
//header('Content-Type: text/plain; charset=UTF-8'); | |
$text = file_get_contents('sample.txt'); | |
print markdown_limited($text); | |
?> | |
<style type="text/css"> | |
/* Don't judge me */ |
<?php | |
/** | |
* QR Code + Logo Generator | |
* | |
* http://labs.nticompassinc.com | |
*/ | |
$data = isset($_GET['data']) ? $_GET['data'] : 'http://labs.nticompassinc.com'; | |
$size = isset($_GET['size']) ? $_GET['size'] : '200x200'; | |
$logo = isset($_GET['logo']) ? $_GET['logo'] : FALSE; |
<?php | |
//set printing option to raw | |
$tmpdir = sys_get_temp_dir(); # ambil direktori temporary untuk simpan file. | |
$file = tempnam($tmpdir, 'ctk'); # nama file temporary yang akan dicetak | |
$handle = fopen($file, 'w'); | |
$condensed = Chr(27) . Chr(33) . Chr(4); | |
$bold1 = Chr(27) . Chr(69); | |
$bold0 = Chr(27) . Chr(70); | |
$initialized = chr(27).chr(64); |
If anyone's looking for a solution for licensing Sublime Text!
Here goes an easy tutorial on how to register, Sublime Text Version 3.2.2, Build 3211
<?php | |
use Mike42\Escpos\CapabilityProfile; | |
use Mike42\Escpos\PrintConnectors\DummyPrintConnector; | |
use Mike42\Escpos\Printer; | |
class RecieptPrinter { | |
/* Create divider */ | |
protected $divider; |
Alias /phpmyadmin /usr/share/phpmyadmin | |
<Directory /usr/share/phpmyadmin> | |
Options SymLinksIfOwnerMatch | |
DirectoryIndex index.php | |
<IfModule mod_php5.c> | |
<IfModule mod_mime.c> | |
AddType application/x-httpd-php .php | |
</IfModule> |