This file contains 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
@ECHO off | |
SETLOCAL ENABLEDELAYEDEXPANSION | |
REM Windows Batch script to backup all mysql databases in a server | |
REM @author: Lenin Meza <[email protected]> | |
REM Database information | |
SET dbhost="10.0.0.2" | |
SET dbuser="exporter" |
This file contains 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
$result = $conn->query($sql); | |
if ($result->num_rows > 0) { | |
$showHeader = true; | |
$firstRow = $result->fetch_assoc(); | |
if ( true === $showHeader ) { // to achieve a 'single header' | |
$showHeader = false; // avoid other headers | |
echo 'Receipt #: ' . $firstRow[0]['info'] . '<br><br>'; | |
echo 'Table #: ' . $firstRow['tid'] . '<br>'; |
This file contains 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 | |
/** | |
* | |
* Last version: https://gist.github.com/josecanciani/ff535426bd5d453ef9c2 | |
* | |
* Credits (adapted from): https://gist.github.com/doubleking/6117215 | |
* | |
**/ |
This file contains 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
/** | |
* include all js files in directory (node.js) | |
* | |
* each file included is concatenated to the file where it was included | |
* like in php | |
*/ | |
var fs = require("fs"); | |
function include_dir(dir, recurse, filelist) { | |
var fs = fs || require('fs'), | |
files = fs.readdirSync(dir); |