Skip to content

Instantly share code, notes, and snippets.

require 'aws-sdk'
require 'json'
REGION = 'us-west-2'
QUEUE_NAME = 'c0wl-cloudtrail'
s3 = Aws::S3::Client.new(region: REGION)
sqs = Aws::SQS::Client.new(region: REGION)
queue_url = sqs.get_queue_url(queue_name: QUEUE_NAME).queue_url
@jeffbryner
jeffbryner / gist:00f0abfe64466e700afd
Created November 28, 2014 20:40
Import IOCs into Elastic Search
Input: A json file with iocs of IP address, category and score like:
{
"2.3.4.5" : {
"P2P" : "55"
},
"1.2.3.4" : {
"Brute_Forcer" : "117",
"Scanner" : "117"
}
}
@ffeldhaus
ffeldhaus / gist:3407267
Created August 20, 2012 19:57
bundle install with puppet-rvm
exec { 'bundle install':
command => '/usr/local/rvm/bin/rvm 1.9.3@rocci-server do bundle install',
cwd => '/home/occi/rocci-server',
logoutput => true,
}
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/