docker run --name recorder-redis -p 6379:6379 -d redis:alpine
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
Here's a one-liner that copies myfile.txt from current directory to my_volume: | |
docker run --rm -v $PWD:/source -v my_volume:/dest -w /source alpine cp myfile.txt /dest |
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
pipeline { | |
agent any | |
stages { | |
stage ('Clean workspace') { | |
steps | |
{ | |
cleanWs() | |
} |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
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 | |
// be sure to name the project dir with the name of the namespace; | |
function AutoLoader($className) | |
{ | |
$file = str_replace('\\','/',$className); | |
require_once $_SERVER["DOCUMENT_ROOT"]."/".$file.'.class.php'; | |
//Make your own path, Might need to use Magics like ___DIR___ | |
} |
Coming from this post, the solution is very simple and doesn't need jQuery.
This is the function that will disable multiple submits to any form that has such attribute
function disableMultipleSubmits() { // by Andrea Giammarchi - WTFPL
Array.prototype.forEach.call(
document.querySelectorAll('form[disablemultiplesubmits]'),
function (form) {
form.addEventListener('submit', this, true);
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 | |
/* | |
* Helper functions for building a DataTables server-side processing SQL query | |
* | |
* The static functions in this class are just helper functions to help build | |
* the SQL used in the DataTables demo server-side processing scripts. These | |
* functions obviously do not represent all that can be done with server-side | |
* processing, they are intentionally simple to show how it works. More complex | |
* server-side processing operations will likely require a custom script. |