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
| // Get your token from the HipChat website "API Access" menu | |
| // Add the token and room where indicated in this line (we use "Easylog") | |
| // Make a new page in your button bar with this in it: | |
| javascript:(function(){function getSelectionText() { var text = "";if (window.getSelection) { text = window.getSelection().toString();} else if (document.selection && document.selection.type != "Control") {text = document.selection.createRange().text;} return text;} var auth_token = "MYTOKENGOESHERE";var room = "Easylog";var ajax = new XMLHttpRequest;var url = "https://api.hipchat.com/v2/room/" + encodeURIComponent(room) + "/notification?auth_token=" + auth_token;ajax.open('POST', url, true);ajax.setRequestHeader("Content-type", "application/json");var message = prompt('log entry?', getSelectionText()); if (message) {ajax.send('{"color":"green", "message": "' + message + '"}');} })() | |
| // getSelectionText() copied from http://stackoverflow.com/questions/5379120/get-the-highlighted-selected-text |
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
| action :create do | |
| chef_gem 'f5-icontrol' | |
| if pool_does_not_exist? | |
| converge_by("Create pool #{pool}") do | |
| create_pool | |
| Chef::Log.info("#{new_resource} created pool #{pool}") | |
| end | |
| 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
| SeanWalbergsMacBookPro:surveys(master *) $ dig +short www.winnipegtransit.com @NS6.SO.CG.SHAWCABLE.NET | |
| SeanWalbergsMacBookPro:surveys(master *) $ dig +short www.winnipegtransit.com @ns56.st.vc.shawcable.net | |
| SeanWalbergsMacBookPro:surveys(master *) $ dig +short www.winnipegtransit.com @NS5.NO.CG.SHAWCABLE.NET | |
| winnipegtransit.com. | |
| 198.163.45.39 | |
| SeanWalbergsMacBookPro:surveys(master *) $ dig +short www.winnipegtransit.com @cowapdns1.winnipeg.ca | |
| winnipegtransit.com. | |
| 198.163.45.39 |
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
| use_inline_resources if defined?(use_inline_resources) | |
| def whyrun_supported? | |
| true | |
| end | |
| action :create do | |
| package "patch" do | |
| action :upgrade |
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
| # This gets you the __git_ps1 function | |
| if [ -f `brew --prefix`/etc/bash_completion.d/git-completion.bash ]; then | |
| . `brew --prefix`/etc/bash_completion.d/git-completion.bash | |
| fi | |
| # show some extra metadata in the prompt such as if you have unchecked/tracked files | |
| export GIT_PS1_SHOWDIRTYSTATE=1 | |
| export GIT_PS1_SHOWSTASHSTATE=1 | |
| export GIT_PS1_SHOWUNTRACKEDFILES=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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Response> | |
| <Dial> | |
| <Sip> | |
| sip:PHONENUMBER@IPADDRESS | |
| </Sip> | |
| </Dial> | |
| </Response> |
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
| asked to geolocate 570 Renfrew St, Winnipeg, MB 0 index.js:12 | |
| asked to geolocate 600 Renfrew St, Winnipeg, MB 1 index.js:16 | |
| in callback Address {textAddress: "600 Renfrew St, Winnipeg, MB", foo: 1, latlon: null, mapObj: null, geolocate: function} | |
| geocode complete [Object] | |
| placing a marker at 600 Renfrew St, Winnipeg, MB hf {k: 49.8609077, D: -97.19679180000003, toString: function, j: function, equals: function…} | |
| in callback Address {textAddress: "600 Renfrew St, Winnipeg, MB", foo: "seen", latlon: hf, mapObj: Mj, geolocate: function} | |
| geocode complete [Object] | |
| placing a marker at 600 Renfrew St, Winnipeg, MB hf {k: 49.8602556, D: -97.19661889999998, toString: function, j: function, equals: function…} |
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
| sean@www:~ $ dig mx hillaryclinton.com | |
| ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6_6.2 <<>> mx hillaryclinton.com | |
| ;; global options: +cmd | |
| ;; Got answer: | |
| ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52801 | |
| ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 4, ADDITIONAL: 0 | |
| ;; QUESTION SECTION: | |
| ;hillaryclinton.com. IN MX |
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
| datastores = if get_config(:vlan) | |
| hosts_on_network = find_network(get_config(:vlan)).host | |
| hosts_on_network.map | |
| else | |
| dc.datastore | |
| 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
| package 'Install Apache' do | |
| package_name case node[:platform] | |
| when 'redhat', 'centos' | |
| 'httpd' | |
| when 'ubuntu', 'debian' | |
| 'apache2' | |
| end | |
| end |