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
| ridley.data_bag.find("listsvc").find("DEV"){ |dbi| dbi["0"]["deploy"] = true; dbi.save } | |
| data_bag = ridley.data_bag.find("listsvc") | |
| data_bag_item = data_bag.item.find("DEV") | |
| data_bag_item["0"]["deploy"] = true | |
| data_bag_item.save |
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
| app.get('/chef', function(req, res) { | |
| var conf = appUtil.parseConfig(); | |
| appUtil.getChefNodes(function(result) { | |
| if (req.query.type && (req.query.type == 'xml')) { | |
| res.set('Content-Type', 'text/xml'); | |
| res.render('xml.ejs', {baseUrl: 'http://localhost:8080', user: conf['chef']['node_name'], org: conf['chef']['organization'], nodeItems:result}); | |
| } else if (req.query.type == 'json') { | |
| res.set('Content-Type', 'application/json'); | |
| res.json('nodeItems:result'); | |
| } else { |
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 min = 10000; | |
| var max = 99999; | |
| var num = Math.floor(Math.random() * (max - min + 1)) + min; |
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
| Batman = require('./lib/dist/batman.node.js'); | |
| var someObject = new Batman.Object(); |
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 sanity = require('sanity'); | |
| sanity.check(['USER', 'MACHTYPE', 'INVISIBLE_FRIENDS', 'AREA_51']); |
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
| #!/usr/bin/env ruby -w | |
| head, treshold = ARGV | |
| head ||= 'HEAD' | |
| Megabyte = 1000 ** 2 | |
| treshold = (treshold || 0.1).to_f * Megabyte | |
| big_files = {} | |
| IO.popen("git rev-list #{head}", 'r') do |rev_list| | |
| rev_list.each_line do |commit| |
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
| openssl rand -base64 512 | tr -d '\r\n' > .chef/data_bag_key | |
| knife data bag create --secret-file .chef/data_bag_key credentials rundeck | |
| knife exec -E 'nodes.transform("fqdn:n7prppplamp*") {|n| n.run_list(["role[zend-pep]", "role[deploy_pep_ui]","role[optier-apache]", "recipe[wdpro_logstash::pep_agent]"])}’ |
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
| upstream app_test_4 { | |
| server 10.249.67.97:10128; | |
| server 10.254.73.6:10128; | |
| } | |
| if ($remote_addr = "24.43.7.27") { | |
| proxy_pass http://app_test_4/; |
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
| Time.now.to_i.to_s(36) | |
| rand.to_s[2..11] |