This file contains 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 | |
require 'rubygems' | |
require 'mongo' | |
include Mongo | |
info = Array.new | |
counts = [ 0 ] | |
sizes = [ 0 ] |
This file contains 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 generated by Chef. Do not edit by hand. | |
<% unless node.platform_family =~ /windows/ -%> | |
127.0.0.1 localhost | |
<% end -%> | |
<%= "#{sprintf("%-15s%3s%-32s%4s%-s", @node.ipaddress, " ", @node.fqdn, " ", @node.hostname)}" %> | |
<% @hosts.sort { |a,b| a.hostname <=> b.hostname }.each do |h| -%> | |
<% unless h.ipaddress == @node.ipaddress -%> | |
<%= "#{sprintf("%-15s%3s%-32s%4s%-s", h.ipaddress, " ", h.fqdn, " ", h.hostname)}" %> | |
<% end -%> |
This file contains 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
unless Chef::Config[:solo] | |
case node.platform_family | |
when "windows" | |
file = "#{node['kernel']['os_info']['system_directory']}\\drivers\\etc\\hosts" | |
else | |
file = "/etc/hosts" | |
end | |
members = search(:node, "chef_environment:#{node.chef_environment}").to_a |
This file contains 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 | |
spaces=${1:-0} | |
if [ "$[$spaces-$spaces]" -ne "0" ]; then | |
spaces=0 | |
fi | |
i=0 | |
while [ $i -lt $spaces ]; do | |
begin="$begin " |
This file contains 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
I have an mzconvert process that crashes. shows up as "having stopped working" in Windows. But the "responding" attribute of the process object is "true." | |
foreach ($sample in (Get-ChildItem -Path $holdfolder | Where-Object { $_.Name -match "(.d|.wiff)$" })) { | |
$samplefolder = $holdfolder + "\" + $sample | |
try { | |
Start-Process -FilePath 'c:\Program Files (x86)\indigobiosystems\adr\mzconvert\mzconvert.exe' -ArgumentList "-f $samplefolder -d $holdsfolder\test" | |
} catch { | |
write-host "Caught an exception:" -ForegroundColor Red | |
write-host "Exception Type: $($_.Exception.GetType().FullName)" -ForegroundColor Red |
This file contains 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 | |
user="indigo_chef" | |
#pass='xxx' | |
################################################################################ | |
# Parse arguments | |
################################################################################ | |
ARGS=`getopt se:r:w $* 2> /dev/null` |
This file contains 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
10.120.18.142 [2013-10-31T13:10:06-04:00] FATAL: Chef::Exceptions::Win32APIError: template[c:/hosts2] (ascent-common::hostsfile line 13) had an error: Chef::Exceptions::Win32APIError: The operation completed successfully. | |
10.120.18.142 ---- Begin Win32 API output ---- | |
10.120.18.142 System Error Code: 0 | |
10.120.18.142 System Error Message: The operation completed successfully. | |
10.120.18.142 ---- End Win32 API output ---- |
This file contains 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 | |
points = [ 1, 2, 1, 4, 1, 3, 2, 9, 7, 5, 10, 1, 2, 1, 2, 1 ] | |
l_max = 0 | |
r_max = 0 | |
l_lava = 0 | |
r_lava = 0 | |
lava = 0 | |
l_peak = 0 |
This file contains 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
# tzdata | |
tzdata tzdata/Areas select America | |
tzdata tzdata/Zones/Etc select UTC | |
tzdata tzdata/Zones/America select Indiana/Indianapolis |
This file contains 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
America/Indiana/Indianapolis |