Skip to content

Instantly share code, notes, and snippets.

@georgexsh
georgexsh / goto.py
Created September 18, 2017 07:47
python goto with system trace function
import sys
def j(lineno):
frame = sys._getframe().f_back
called_from = frame
def hook(frame, event, arg):
if event == 'line' and frame == called_from:
try:
frame.f_lineno = lineno
@jayunit100
jayunit100 / -
Created September 15, 2017 20:46
twitter/hadoop-lzo
twitter/scribe
twitter/thrift_client
twitter/twurl
twitter/elephant-bird
twitter/standard-project
twitter/snowflake
twitter/spitball
twitter/ostrich
twitter/scala_school
@TomRyan-321
TomRyan-321 / security-group-cleanup.py
Last active October 29, 2024 02:54 — forked from lingmann/security-group-cleanup.py
Security Group Cleanup using boto3 with RDS check fixed
#!/usr/bin/env python
import boto3
import argparse
def lookup_by_id(sgid):
sg = ec2.get_all_security_groups(group_ids=sgid)
return sg[0].name
@kangks
kangks / ec2TagCheck.py
Created May 19, 2017 21:01
Lambda function triggered by CloudTrail events to check for tagging, and notify the owner through SES if tagging not found
import boto3
required_keys = [ "key01", "key02", "key03", "key04" ]
ses_source = '[email protected]'
ses_destination = ['[email protected]']
def lambda_handler(event, context):
if 'detail' in event and 'instance-id' in event['detail']:
ec2_instance_id = event['detail']['instance-id']
@crittermike
crittermike / jira_template.md
Last active November 15, 2022 17:54
JIRA ticket template in the 3 C's format (Card, Conversation, and Confirmation)

h2. Card

Also known as the User Story. Explain the requirement in a sentence or two. This should just enough text to identify the requirement, including any crucial information about site/environment.

As a [user role], I want [function], so that [value].

If this doesn't fit as a user story (e.g., a bug ticket), that's fine, just explain it as a concise sentence.

h2. Conversation

@jessfraz
jessfraz / proposal.md
Created February 3, 2017 00:09
High-Level Security Profile Generator

High-Level Security Profile Generator

(originally from my proposal on moby/moby#17142 (comment) but generic)

The profile would generate artificats of an apparmor profile and seccomp filters.

Obviously doesn't have to be toml since that's super hipster :p

Assumptions

  • no one is going to sit and write out all the syscalls/capabilities their app needs
  • automatic profiling would be super cool but like aa-genprof it is never
@tikolakin
tikolakin / jira-template-injector.json
Last active November 6, 2019 08:37
Template for jira-template-injector
{
"options": {
"limit": []
},
"templates": {
"BUG TEMPLATE": {
"issuetype-field": "Bug",
"text": "h4. Summary:\n<TI>Enter summary of the problem here.</TI>\n\nh4. Environment:\n<TI>provide as much as possible from the following: instance : platform : device : os : resolution</TI>\n\nh4. Steps to Reproduce:\n<TI>Enter detailed steps to reproduce here. More detail is better.</TI>\n\nh4. Actual Behaviour:\n<TI>Screenshot. Enter what should happen here.</TI>\n\nh4. Expected Behaviour:\n<TI>Enter what should happen here.</TI>\n\nh4. Additional Notes:\n<TI>Enter any other details such as examples, links to requirements, JIRA issue etc. Any criteria that might help with fixing the problem. More detail is better.</TI>\n"
},
"DEFAULT TEMPLATE": {
@jezhumble
jezhumble / inventory_vpcs.py
Last active October 9, 2019 05:52
List EC2, RDS and ElastiCache instances, grouped by VPC
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse, sys, boto3
from colorama import Fore, Style
def count(my_list, my_key):
if my_key not in my_list:
return '0'
else:

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?