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
| //ajax.googleapis.com/ajax/libs/angularjs/1.2.22/angular.min.js | |
| //code.jquery.com/jquery.min.js | |
| //getbootstrap.com/dist/js/bootstrap.js | |
| //maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css |
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 | |
| # Modified from http://www.shellhacks.com/en/Check-a-Website-Response-Time-from-the-Linux-Command-Line | |
| curl -s -w '\nLookup:\t%{time_namelookup}\nConnect:\t%{time_connect}\nApp Connect:\t%{time_appconnect}\nRedirect:\t%{time_redirect}\nPretransfer:\t%{time_pretransfer}\nStarttransfer:\t%{time_starttransfer}\n\nTotal:\t%{time_total}\n' -o /dev/null {$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
| var os = require("os"); | |
| //Create function to get CPU information | |
| function cpuAverage() { | |
| //Initialise sum of idle and time of cores and fetch CPU info | |
| var totalIdle = 0, totalTick = 0; | |
| var cpus = os.cpus(); | |
| //Loop through CPU cores |
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
| --- | |
| # ^^^ YAML documents must begin with the document separator "---" | |
| # | |
| #### Example docblock, I like to put a descriptive comment at the top of my | |
| #### playbooks. | |
| # | |
| # Overview: Playbook to bootstrap a new host for configuration management. | |
| # Applies to: production | |
| # Description: | |
| # Ensures that a host is configured for management with Ansible. |
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
| <?PHP | |
| /** | |
| * pingdom.php | |
| * | |
| * This application will check your server swap, hard drive, cpu, and MySQL conditions. | |
| * It will then generate an appropriate XML file for a Pingdom HTTP Custom check. | |
| * | |
| * If any usage is above your preset thresholds, then a down message will be returned, | |
| * indicating that your server may be under more load than usual, hopefully, providing | |
| * a bit of advanced notice before a true failure due to lack of resources |
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> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <meta name="description" content=""> | |
| <meta name="author" content=""> | |
| <title>Starter Template for Bootstrap</title> |
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
| # At most 10 concurrent connections from a client | |
| acl too_fast fe_sess_rate ge 10 | |
| # Matches any path beginning with a given prefix | |
| acl bursts_inclined path_beg -i /client1 | |
| # Effectively working as a delay mechanism for clients that are too fast | |
| tcp-request inspect-delay 1000ms | |
| # Fast-path - accept connection if it's not this troublesome client |
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
| /** | |
| * Move in a circle without wrapper elements | |
| * Idea by Aryeh Gregor, simplified by Lea Verou | |
| */ | |
| @keyframes rot { | |
| from { | |
| transform: rotate(0deg) | |
| translate(-150px) | |
| rotate(0deg); |
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
| file_to_disk = './tmp/large_disk.vdi' | |
| Vagrant::Config.run do |config| | |
| config.vm.box = 'base' | |
| config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024] | |
| config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk] | |
| end |
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
| # Regular Variable | |
| {{ regular_variable }} | |
| # If / Else | |
| {% if use_hyperdrive == false %} | |
| Hyperdrive is not enabled | |
| {% else %} | |
| Hyperdrive is enabled! | |
| {% endif %} |