Skip to content

Instantly share code, notes, and snippets.

View edyesed's full-sized avatar
😵‍💫
I don't know what is happening

Ed⁦ edyesed

😵‍💫
I don't know what is happening
  • Seattle, WA
View GitHub Profile
@edyesed
edyesed / run_this_shell.sh
Created August 3, 2018 05:14
Get IAM List,Get,Describe actions
# The IAM User guide is in a GH repo now, clone that.
git clone [email protected]:awsdocs/iam-user-guide.git
# get into the directory where the files are located
cd iam-user-guide/doc_source/
# The permissions pages begin with list_*.md
# Read those puppies
grep 'service prefix:' list_*md | while read rline; do
FILEN=`echo ${rline} | awk -F: {'print $1'}`
@edyesed
edyesed / serverless.yml
Created December 21, 2016 17:21
Example serverless.yml
# read cloudtrail things dropped off at s3, put them in ES
service: cloudtrailindexer
provider:
name: aws
runtime: python2.7
# you can overwrite defaults here
# stage: dev
region: us-west-2
@edyesed
edyesed / tweetmarkov.py
Created October 4, 2016 03:37
so you want to do something with a markov bot and tweeter....
#!/usr/bin/env python
#
import twitter
from pymarkovchain import MarkovChain
from pprint import pprint
TW_CONSUMER_KEY='xxx'
TW_CONSUMER_SECRET='yyy'
TW_ACCESS_TOKEN='aaa'
@edyesed
edyesed / runthis.py
Created August 10, 2016 05:14
devops comedy podcast topic generator
from twitter import *
from pymarkovchain import MarkovChain
t = Twitter(auth=OAuth('x', 'y', 'zz', 'y'))
# count=1000, but they only come back 100 at a time.
# search on devops with a sad sentiment
res = t.search.tweets(q="devops%20%3F",count=1000)
for stat in res['statuses']:
mc.generateDatabase(stat['text'], sentenceSep='\n', n=2)
@edyesed
edyesed / log4j config
Created February 27, 2014 22:56
log4j config to sent to logstash log4 input
<appender name="SYSLOG" class="org.apache.log4j.net.SocketAppender">
<param name="Port" value="5555"/>
<param name="RemoteHost" value="your-logstash-forwarder.hostname"
<param name="ReconnectionDelay" value="5000"/>
<layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{ISO8601} ORIGIN_HOSTNAME %t[%x]:%m %n"/>
</layout>
</appender>
@edyesed
edyesed / controlplane-crash
Created April 25, 2013 01:42
ControlPlane crash.
Process: ControlPlane [27822]
Path: /Applications/ControlPlane.app/Contents/MacOS/ControlPlane
Identifier: com.dustinrue.ControlPlane
Version: 1.3.14 (47)
Code Type: X86-64 (Native)
Parent Process: launchd [181]
Date/Time: 2013-04-24 19:23:16.848 -0500
OS Version: Mac OS X 10.7.5 (11G63)
Report Version: 9