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
| input = "If you are self-motivated, wow, this world is tailored for you. The boundaries are all gone. But if you're not self-motivated, this world will be a challenge because the walls, ceilings and floors that protected people are also disappearing. That is what I mean when I say \"it is a 401(k) world.\" Government will do less for you. Companies will do less for you. Unions can do less for you. There will be fewer limits, but also fewer guarantees. Your specific contribution will define your specific benefits much more. Just showing up will not cut it. - T. Friedman".downcase | |
| pair = "ou" | |
| third = "r" | |
| pairs = (0..input.length-2).inject({}) do |h,i| | |
| key, val = input[i,2], input[i + 2] | |
| h[key] = {} unless h[key] | |
| h[key][val] = (h[key][val] || 0) + 1 if val | |
| h | |
| 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
| require 'optparse' | |
| require 'rexml/document' | |
| require 'csv' | |
| options = {} | |
| OptionParser.new do |opts| | |
| opts.banner = "Usage: unfuddle_xml_to_jira_csv.rb -i backup.xml -o project.csv -k PROJECTKEY" | |
| opts.on("-i", "--input FILE", "Input XML") do |i| | |
| options[:input] = i |
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
| coldfusion10_config "rutime" do | |
| action :set | |
| property "runtimeProperty" | |
| args ({"propertyName" => "CFFormScriptSrc", "propertyValue" => node['cf10']['lockdown']['?']}) | |
| 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
| # CM is the project key | |
| git filter-branch --msg-filter 'sed "s/#\([0-9]*\)/#\1 [CM-\1]/g"' |
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
| Usage: | |
| To use GUI: | |
| java -jar wsconfig.jar | |
| To use property file to specifiy options: | |
| java -jar wsconfig.jar -f <property-file-path> | |
| To use command line to specify options: | |
| java -jar wsconfig.jar [options] | |
| Options | |
| To install web server connector: |
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
| <cfcomponent name="cfjedis" displayname="Jedis" hint="This CFC handles communication with Redis"> | |
| <cffunction name="init" access="public" returntype="Any" output="no"> | |
| <cfargument name="serverName" type="string" required="true" /> | |
| <cfargument name="port" type="numeric" required="true" /> | |
| <cfset variables.pool = createObject("java","redis.clients.jedis.JedisPool").init(JavaCast("string",arguments.serverName), JavaCast("integer",arguments.port)) /> | |
| <cfreturn this> | |
| </cffunction> | |
| <cffunction name="getResource" access="private" returntype="Any" output="no"> |
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
| git tag -l | while read line; do if [[ $line == v* ]]; then git tag ${line:1:5} $line && git tag -d $line && git push origin :refs/tags/$line; fi done |
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
| # Reject packets other than those explicitly allowed | |
| simple_iptables_policy "INPUT" do | |
| policy "DROP" | |
| end | |
| # The following rules define a "system" chain; chains | |
| # are used as a convenient way of grouping rules together, | |
| # for logical organization. | |
| # Allow all traffic on the loopback device |
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
| coldfusion10_config "set_colfire_debugging" do | |
| action :bulk_set | |
| config ( { | |
| "debugging" => { | |
| "debugProperty" => [ | |
| {"propertyName" => "enableDebug", "propertyValue" => true } | |
| ] | |
| } | |
| } ) | |
| 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
| site 'http://community.opscode.com/api/v1' | |
| cookbook 'apt' | |
| cookbook 'rng-tools' | |
| cookbook 'java' | |
| cookbook 'tomcat' | |
| cookbook 'shibboleth-idp', | |
| :git => 'https://github.com/wharton/chef-shibboleth-idp.git' | |
| cookbook 'simple_iptables', | |
| :git => 'https://github.com/nmische/cookbook-simple-iptables.git', | |
| :ref => 'nat' |