I hereby claim:
- I am petegoo on github.
- I am petegoo (https://keybase.io/petegoo) on keybase.
- I have a public key whose fingerprint is BC12 C6A0 EB71 77CB 8720 186A A3EB 91C7 D76F F679
To claim this, I am signing this object:
#!/bin/bash | |
# To use just set a variable with SSM_<target_env_var>=<ssm_parameter_store_path> | |
# e.g. SSM_database_password=prod/myservice/database-password | |
function get_parameter { | |
SSM_ENV_VAR_NAME=$1 | |
ENV_VAR_NAME=`echo "$SSM_ENV_VAR_NAME" | cut -c5-` | |
SSM_PARAM_NAME="${!SSM_ENV_VAR_NAME}" | |
I hereby claim:
To claim this, I am signing this object:
echo | openssl s_client -connect sub.domain.com:443 2>/dev/null -servername sub.domain.com| openssl x509 -dates -noout -subject |
function Get-Collector([string] $collectorName, [PSCredential] $credential) { | |
$response = iwr "https://api.sumologic.com/api/v1/collectors" -Credential $credential | |
$content = ConvertFrom-Json $response.Content | |
$match = $content.collectors | Where {$_.name -eq $collectorName} | Select -First 1 | |
return $match | |
} | |
function Get-CollectorSources([string] $collectorName, [PSCredential] $credential) { | |
$collector = Get-Collector $collectorName $credential |
function Send-UdpDatagram | |
{ | |
Param ([string] $EndPoint, | |
[int] $Port, | |
[string] $Message) | |
$IP = [System.Net.Dns]::GetHostAddresses($EndPoint) | |
$Address = [System.Net.IPAddress]::Parse($IP) | |
$EndPoints = New-Object System.Net.IPEndPoint($Address, $Port) | |
$Socket = New-Object System.Net.Sockets.UDPClient |
import sublime, sublime_plugin, textwrap, unicodedata | |
# from http://stackoverflow.com/questions/22063366/show-info-about-current-character-in-status-bar-in-sublime-text-2 | |
class utfcodeCommand(sublime_plugin.EventListener): | |
def on_selection_modified(self, view): | |
# some test chars = $ € | |
sublime.status_message('Copying with pretty format') | |
selected = view.substr(view.sel()[0].a) | |
char = str(selected) |
<# | |
.SYNOPSIS | |
Clones an SVN repository usng git-svn, mapping users using Active Directory. | |
.DESCRIPTION | |
This function is a wrapper around git-svn that tries to resolve the names and email addresses of all users in the commit history | |
.Parameter SvnPath | |
The full path to the SVN repository |
var robot = Require<Robot>(); | |
robot.Respond(@"show all the scores", msg => { | |
msg.Http("http://live.mobileapp.fifa.com/api/wc/matches").GetJson((err, res, body) => { | |
var groups = GetMatches(msg).Where(m => m["b_Started"].Value<bool>()).GroupBy(m => m["c_Phase_en"].ToString()); | |
if(!groups.Any()){ | |
return; |
var robot = Require<Robot>(); | |
var iterations = Enumerable.Range(0,100000); | |
var random = new Random(); | |
Parallel.ForEach(iterations, i => { |