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
# Add the oracle jvm ppa, and install java8 | |
# https://launchpad.net/~webupd8team/+archive/ubuntu/java | |
# This is used for all java installs | |
# This is slightly retooled due to a bug in Salt 2014.7 (Helium) | |
# ... and to not use cmd.run | |
oracle-ppa: | |
pkgrepo.managed: | |
- humanname: WebUpd8 Oracle Java PPA repository | |
- name: deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main | |
- dist: trusty |
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 | |
$redis_server=""; | |
$redis_port=""; | |
$redis_connetion_timeout="5"; | |
$redis_test_key="redis_check"; | |
$redis_test_value=""; | |
$mysql_server=""; | |
$mysql_user=""; |
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 -r '$x=new SimpleXMLElement(file_get_contents("sitemap.xml"));foreach($x->url as $n) echo $n->loc.PHP_EOL;' > urls.txt |
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 has been tested with ansible 1.3 with these commands: | |
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false" | |
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true" | |
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts" | |
# NB: The type of the variable is crucial! | |
- name: Ansible Conditionals Examples | |
hosts: $hosts | |
vars_files: |
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 | |
/** | |
* This file sets up exception and error handlers to log errors to our Graylog2 | |
* server. | |
* | |
* @author Jeremy Cook | |
*/ | |
//Add the autoloader generated by composer for dependencies. | |
require_once 'path/to/composer/autoload.php'; |
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
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
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
# It locates on /etc/systemd/system/ | |
[Unit] | |
Description=Cleaning unnecessary cadvisor system resources. See issue https://github.com/kubernetes/kubernetes/issues/64137. | |
[Service] | |
Slice=cadvisor-gc.slice | |
ExecStart=/opt/cadvisor-gc/cadvisor-gc.sh | |
[Install] |
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
/***************************************** | |
WAKE UP, NEO... | |
Author: Jack Rugile; | |
MODS by Victor Casals - VSDigital | |
* Multiple message | |
* Simulation of human typing |
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
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.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
#!/usr/bin/env python3 | |
""" | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer | |
import logging | |
class S(BaseHTTPRequestHandler): |
OlderNewer