CT_ID=$(docker run -itd centos /bin/bash)
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
| {"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[1.70256,43.26674],[1.71361,43.18971],[1.77491,43.1522],[1.95272,43.09574],[1.94358,43.05127],[1.97737,43.01511],[1.98952,42.96053],[1.96902,42.9196],[1.97724,42.86374],[1.88693,42.84429],[1.86549,42.81589],[1.91268,42.75662],[1.99185,42.73139],[2.05561,42.74426],[2.15772,42.69145],[2.16607,42.66384],[2.00565,42.65613],[1.9383,42.5718],[1.87282,42.57898],[1.76111,42.56764],[1.72199,42.60986],[1.59735,42.62192],[1.54309,42.64936],[1.46681,42.64146],[1.45141,42.60205],[1.4293,42.59539],[1.36108,42.68672],[1.31912,42.71336],[1.13433,42.71597],[1.06818,42.77612],[0.92111,42.78437],[0.8561,42.81276],[0.83248,42.88415],[0.8866,42.95899],[0.99225,42.99031],[0.9966,43.09469],[1.05443,43.13695],[1.13703,43.15403],[1.24269,43.08878],[1.29011,43.12345],[1.22467,43.15731],[1.23658,43.1848],[1.34939,43.2043],[1.38231,43.23132],[1.31551,43.25984],[1.30567,43.29905],[1.37378,43.29647],[1.41984,43.2614],[1.44093,43.21297],[ |
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
| <!DOCTYPE html> | |
| <html lang="en" > | |
| <head> | |
| <script src="https://cdn.jsdelivr.net/gh/feross/simple-peer@c5f8a8ded50ef354d5a0f8a3700f8817565ed032/simplepeer.min.js"></script> | |
| </head> | |
| <body> | |
| <button id="startVideoPeer1">Start Video Chat Peer1</button> |
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
| ## cUrl, used with "-K -", reads the config from the stdin, but waits for stdin's EOF before executing any HTTP requests | |
| ## See : http://comments.gmane.org/gmane.comp.web.curl.general/15001 | |
| ## Using the split's filter options allows starting and piping a stream to a new curl's stdin every N requests | |
| ## A same connexion can be kept alive for those N requests, making perfs much much better | |
| ## TODO : Find a way to parallelise several curl in a "xargs -P" way | |
| ## Example : (the for loop is there to simulate some real stream, and to demonstrate the curl's required format) |
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
| #!/bin/bash | |
| debug=0; | |
| ## Clean up working temp files | |
| function clean_up { | |
| ((debug)) || rm -rf "${path_to_file}" | |
| } | |
| trap clean_up EXIT |
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
| #!/bin/bash | |
| set -eo pipefail | |
| CONSUL_EP="IP:PORT" | |
| main() { | |
| # Exit when required files are not present | |
| [[ -f /etc/vz/vz.conf ]] || exit 1 |
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
| #!/bin/bash | |
| ## Fail fast and be aware of exit codes | |
| set -eo pipefail | |
| # Guess unused CTID, by increasing the last one | |
| get_ct_id() { | |
| #local ctid=$(/usr/sbin/vzlist -H -a -octid \ | |
| # 2>/dev/null | tail -1) | |
| #[ -n "$ctid" ] || ctid=100 |
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
| #!/bin/bash | |
| # Clone a (ploop) openVZ CT with base image dedup | |
| # Ex : ./vzclone $CTID | xargs vzctl start | |
| set -eo pipefail | |
| if [ -z $1 ]; then | |
| >&2 echo "Usage: vzclone CTID" | |
| exit 1 |
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
| #!/bin/bash | |
| ## Create an openVZ template (tar ball) from a running CT | |
| set -eo pipefail | |
| if [ -z $1 ] | |
| then | |
| echo "Usage: vztmpl-cr CTID [NAME]" | |
| exit 1 |