Skip to content

Instantly share code, notes, and snippets.

View waynerobinson's full-sized avatar

Wayne Robinson waynerobinson

View GitHub Profile
import boto3
import os
import json
client = boto3.client('stepfunctions')
def lambda_handler(event, context):
print(event)
messageBody = json.loads(event['body'])
task_token = messageBody['task_token']
executionArn = messageBody['executionArn']
import boto3
import os
def lambda_handler(event, context):
print(event['queryStringParameters'])
client = boto3.client('stepfunctions')
country = event['queryStringParameters']['Country']
exec_response = client.start_execution(
stateMachineArn=os.environ.get('stepfunctions_arn'),
#name='string',
require 'webrick'
server = WEBrick::HTTPServer.new :Port => 8000
trap 'INT' do server.shutdown end
server.mount_proc '/' do |req, res|
res.body = 'Hello, world!'
end
while [[ $# > 1 ]]
do
key="$1"
case $key in
-e|--extension)
EXTENSION="$2"
shift # past argument
;;
-s|--searchpath)
class Foo
@@cvar = 100
class << self
def cvar
@@cvar
end
attr_accessor :ivar
end
@waynerobinson
waynerobinson / intercom_messenger_checker.js.coffee
Last active August 29, 2015 14:05
Check to see if Intercom messenger open.
# Control how Intercom.io messenger is updated before it moves to realtime.
intercomOpenCheck = $interval( () ->
if $("#intercom-messenger.intercom-messenger-active").length > 0
$rootScope.intercomMessengerActive = true
else
$rootScope.intercomMessengerActive = false
, 7000)
intercomIntervalCounter = 0
intercomUpdateCheck = $interval( () ->
class ClubRegistration
def initialize(attributes = {})
@attributes = attributes
end
def club
@club ||= Club.new
end
HOST: app1.ec2.investmentlink.com Loss% Snt Last Avg Best Wrst StDev
1.|-- 10.99.3.254 0.0% 100 0.2 0.2 0.2 1.3 0.1
2.|-- ec2-54-252-0-26.ap-southe 0.0% 100 0.7 1.6 0.5 48.2 5.4
3.|-- 54.240.192.132 0.0% 100 2.5 3.7 2.2 60.9 6.5
4.|-- 54.240.192.108 0.0% 100 2.4 2.7 2.2 15.3 1.6
5.|-- 54.240.192.78 0.0% 100 2.5 2.8 2.1 23.6 2.3
6.|-- 202.68.70.5 0.0% 100 1.8 3.2 1.6 98.5 9.9
7.|-- xe-5-1-0.r05.sydnau01.au. 0.0% 100 2.1 2.5 1.6 22.9 3.0
8.|-- p16-1-2-0.r02.lsanca03.us 10.0% 100 138.7 142.4 138.5 219.2 11.8
| `|-- 129.250.3.18
HOST: app1.ec2.investmentlink.com Loss% Snt Last Avg Best Wrst StDev
1.|-- 10.99.3.254 0.0% 100 0.3 0.2 0.2 0.4 0.0
2.|-- ec2-54-252-0-22.ap-southe 0.0% 100 0.5 1.3 0.5 27.6 3.5
3.|-- 54.240.192.114 0.0% 100 12.9 2.4 1.0 27.0 4.6
4.|-- 54.240.192.90 0.0% 100 12.7 5.8 1.0 68.0 7.2
5.|-- 202.68.70.9 0.0% 100 1.0 2.5 1.0 79.7 9.4
6.|-- xe-0-1-0.r05.sydnau01.au. 0.0% 100 1.0 1.6 1.0 22.1 2.3
7.|-- p16-1-2-0.r02.lsanca03.us 8.0% 100 138.0 139.1 137.9 162.2 2.8
| `|-- 129.250.3.18
8.|-- xe-0-1-3.r21.lsanca03.us. 0.0% 100 139.2 148.5 138.0 219.2 22.2