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
//Simple helper to debug to the console | |
function debug_to_console($data) { | |
if ( is_array( $data ) ) | |
$output = "<script>console.log( 'PaulBot Debug: " . implode( ',', $data) . "' );</script>"; | |
else | |
$output = "<script>console.log( 'PaulBot Objects: " . $data . "' );</script>"; | |
echo $output; | |
} |
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
Check if remote port is open with bash: | |
echo >/dev/tcp/8.8.8.8/53 && echo "open" | |
Suspend process: | |
Ctrl + z | |
Move process to foreground: | |
fg | |
Generate random hex number where n is number of characters: |
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 id="errormsg"><ul></ul></div> | |
<div class="form-group"> | |
<label class="col-sm-2 control-label">Title <div class="required">*</div></label> | |
<div class="col-sm-10"><input type="text" class="input-xlarge form-control" name="title_auc" id="title_auc" value="<?php echo $row_auction['title_auc']; ?>"/></div> | |
</div> |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/* Set the defaults for DataTables initialisation */ | |
$.extend( true, $.fn.dataTable.defaults, { | |
"sDom": "<'row'<'col-md-6'l><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>", | |
"sPaginationType": "bootstrap", | |
"oLanguage": { | |
"sLengthMenu": "_MENU_ records per page" | |
} | |
} ); | |