Skip to content

Instantly share code, notes, and snippets.


Gene Wood gene1wood

View GitHub Profile
alexcasalboni /
Last active Jun 25, 2021
AWS Lambda Static Type Checker Example (Python3)

How to use Python3 Type Hints in AWS Lambda


Static Type Checkers help you find simple (but subtle) bugs in your Python code. Check out and incrementally improve your code base and development/debugging experience with type hints.

Your Lambda Function code will go from this:

Luzifer /
Last active Jun 30, 2021
Running docker-compose as a systemd service

Running docker-compose as a systemd service


File Purpose
/etc/compose/docker-compose.yml Compose file describing what to deploy
/etc/systemd/system/docker-compose-reload.service Executing unit to trigger reload on docker-compose.service
/etc/systemd/system/docker-compose-reload.timer Timer unit to plan the reloads
/etc/systemd/system/docker-compose.service Service unit to start and manage docker compose
skylander86 /
Created Jan 4, 2017
Python port of arithmetric/aws-lambda-ses-forwarder. An AWS Lambda function for forwarding incoming emails through SES.
This code is a Python 2.7 port of [aws-lambda-ses-forwarder]( Follow instructions there for setting up SES and AWS Lambda.
from email import message_from_file
import json
import logging
import os
import re

How to add an image to a gist

  1. Create or find a gist that you own.
  2. Clone your gist (replace <hash> with your gist's hash):
    # with ssh
    git clone<hash>.git mygist
    # with https
    git clone<hash>.git mygist
phrawzty /
Last active Jul 19, 2021
simple python http server to dump request headers
#!/usr/bin/env python2
import SimpleHTTPServer
import SocketServer
import logging
PORT = 8000
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
renatolfc / android-client.ovpn
Created Dec 28, 2014
A sample OpenVPN client configuration file in the unified format
View android-client.ovpn
dev tun
resolv-retry infinite
ca [inline]
cert [inline]
key [inline]
bguiz /
Last active Dec 16, 2016
Ensures that you don't lose your gnome-terminal windows when you crash/ reboot Linux


  • create and alias/ symlink for the file, I use '' in my home directory
  • when you fire up a gnome-terminal
    • enter ~/ and leave that tab running in the background
  • when you crash and reboot, and fire up a gnome-terminal
    • enter ~/ restore to restore all your windows and tabs that you previously had open, and it will cotninue watching automatically after that is done

Problem that it solves

rxaviers / gist:7360908
Last active Jul 23, 2021
Complete list of github markdown emoji markup
View gist:7360908


:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
piscisaureus /
Created Aug 13, 2012
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

casualjim / recipe.rb
Created Oct 5, 2011 — forked from rberger/recipe.rb
S3 File Resource for Chef
View recipe.rb
# Source accepts the protocol region:// with the host as the bucket
# access_key_id and secret_access_key are just that
# for the eu-west-1 region:
s3_file "/var/bulk/the_file.tar.gz" do
source "s3-eu-west-1://your.bucket/the_file.tar.gz"
access_key_id your_key
secret_access_key your_secret
owner "root"
group "root"