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
¯\_(ツ)_/¯ |
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
for i in $(docker-machine ls | grep digitalocean | awk '{print $1}'); \ | |
do printf "\x1B[01;33m\n$i\n\x1B[0m" && docker-machine ssh $i ls /swapfile || \ | |
docker-machine ssh $i -- \ | |
"fallocate -l 1G /swapfile && chmod 600 /swapfile && mkswap /swapfile && \ | |
echo -e '\n/swapfile none swap defaults 0 0' >> /etc/fstab && swapon -a && free -htl"; done |
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
CREATE DATABASE `databasename` CHARACTER SET utf8 COLLATE utf8_general_ci; | |
GRANT ALL ON `databasename`.* TO `username`@localhost IDENTIFIED BY 'password'; |
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
cwd="$(pwd)/$( dirname "${BASH_SOURCE[0]}" )" | |
cpd="$(pwd)/$( dirname "${BASH_SOURCE[0]}" )/.." |
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
privacy_policy_label = TEXT | |
privacy_policy_label.data = LLL:fileadmin/Pipapo/Private/Language/locallang.xlf:label.privacy_policy | |
privacy_policy_label.stdWrap.replacement.10 { | |
search = %%%link%%% | |
replace.stdWrap.typolink { | |
parameter = {$privacy_policy.pid} | |
} | |
} |
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
# for small servers | |
default['apache']['timeout'] = 30 | |
default['apache']['keepaliverequests'] = 10 | |
default['apache']['keepalivetimeout'] = 5 | |
# only for prefork | |
default['apache']['prefork']['startservers'] = 3 | |
default['apache']['prefork']['minspareservers'] = 3 | |
default['apache']['prefork']['maxspareservers'] = 5 | |
default['apache']['prefork']['maxrequestworkers'] = 10 | |
default['apache']['prefork']['maxconnectionsperchild'] = 0 |
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
public function initializeNewAction() { | |
if( !$this->request->hasArgument('newObject') && $this->request->getHttpRequest()->hasArgument('newObject') ) { | |
$this->request->setArgument('newObject', $this->request->getHttpRequest()->getArgument('newObject')); | |
} | |
} |
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
// 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 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
- | |
requestFilter: 'parentRequest.isPackage("My.Package") && isSubPackage("ViewHelpers\Widget") && isController("Paginate")' | |
options: | |
templatePathAndFilename: | |
'resource://My.Package/Private/Templates/ViewHelpers/Widget/Paginate/Index.html' |
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
function escapeHtml(text) { | |
var map = { | |
'&': '&', | |
'<': '<', | |
'>': '>', | |
'"': '"', | |
"'": ''' | |
}; | |
return text.replace(/[&<>"']/g, function(m) { return map[m]; }); |