#Site Reliability Engineer
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
@Grab(group='joda-time', module='joda-time', version='2.3') | |
import org.joda.time.DateTime | |
def eventList = [ | |
[ name: "Event One", startDate: new DateTime(2014,2,12,11,0,0), endDate: new DateTime(2014,2,12,12,0,0) ], | |
[ name: "Event Two", startDate: new DateTime(2014,2,12,13,0,0), endDate: new DateTime(2014,2,12,14,0,0) ], | |
[ name: "Event Three", startDate: new DateTime(2014,2,12,11,30,0), endDate: new DateTime(2014,2,12,12,30,0) ], | |
[ name: "Event Four", startDate: new DateTime(2014,2,12,9,0,0), endDate: new DateTime(2014,2,12,10,0,0) ], | |
[ name: "Event Five", startDate: new DateTime(2014,2,12,9,0,0), endDate: new DateTime(2014,2,12,10,0,0) ], | |
[ name: "Event Six", startDate: new DateTime(2014,2,12,10,0,0), endDate: new DateTime(2014,2,12,11,0,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
curl-openssl-7.33.0-1.1.x86_64.rpm | |
curl-openssl-debuginfo-7.33.0-1.1.x86_64.rpm | |
libcurl-openssl-7.33.0-1.1.x86_64.rpm | |
libcurl-openssl-devel-7.33.0-1.1.x86_64.rpm | |
liblog4shib-devel-1.0.8-1.1.x86_64.rpm | |
liblog4shib1-1.0.8-1.1.x86_64.rpm | |
libsaml-devel-2.5.3-1.1.x86_64.rpm | |
libsaml8-2.5.3-1.1.x86_64.rpm | |
libxerces-c-3_1-3.1.1-2.1.x86_64.rpm | |
libxerces-c-devel-3.1.1-2.1.x86_64.rpm |
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
comm -23i <(cat full.txt | sort | uniq -i) <(cat dupes.txt | sort | uniq -i) |
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
# We can sort using a custom adjacency index that allows us to pick the starting node. | |
tickets = [('PHL','NYC'),('IAD','PHL'),('SFO','IAD'),('NYC','SFO')] | |
sortedTickets = [] | |
index = {} | |
for t in tickets: | |
if t[0] not in index: | |
index[t[0]] = t | |
def getNext(ticket): |
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
new File('~/tmp').eachFile { | |
def toolkit = new CharsetToolkit(it) | |
def cs = toolkit.getCharset().toString() | |
def filePath = it.path + '/' + it.name | |
println filePath + ': ' + cs | |
if (cs != 'UTF-8') { | |
def content = it.getText(cs) | |
it.write(content ,'UTF-8') |
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/sh | |
cf-agent --bootstrap --policy-server 10.0.2.15 |
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
nc -v -z -w 3 google.com 80 &> /dev/null && echo "Online" || echo "Offline" |
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
bundle agent netapp_nfs(server, source) { | |
storage: | |
"/data" | |
mount => netapp_mount($(server), $(source)), | |
classes => classes_generic("netapp_nfs"); | |
} | |
body mount netapp_mount(server, source) { | |
mount_type => "nfs"; | |
mount_server => "$(server)"; |
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
wrench | |
hosts | |
-i --include-context comma delimited string of regular expression strings | |
-x --exclude-context comma delimited string of regular expression strings | |
-d --data-centers list of datacenters | |
"datacenter ip hostname" | |
OlderNewer