Skip to content

Instantly share code, notes, and snippets.

View chicks-net's full-sized avatar
🏠
Working from home

Christopher Hicks chicks-net

🏠
Working from home
View GitHub Profile
@sebsto
sebsto / gist:9a958ff1c761b8c7c90d
Last active December 16, 2019 17:51
Create IAM User and Attach a Policy using Boto and JSON
import json, boto
# Connect to IAM with boto
iam = boto.connect_iam(ACCESS_KEY, SECRET_KEY)
# Create user
user_response = iam.create_user('aws-user')
# Create Policy
policy = { 'Version' : '2012-10-17'}
@thwarted
thwarted / heroku-toolbelt.spec
Last active January 2, 2016 10:29
rpm .spec file for heroku-toolbelt
Name: heroku-toolbelt
Version: 3.2.1
Release: 1%{?dist}
Summary: Heroku Toolbelt Client
Group: Development
License: Unknown
URL: https://toolbelt.heroku.com/
#Source0:
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@quiver
quiver / README.txt
Created November 23, 2012 06:15
[python]demo of os.wait3/4:with wait3/4 you can retrieve resource usage information about the child processes.
# RESOURCE
- WAIT4(2)
http://www.kernel.org/doc/man-pages/online/pages/man2/wait4.2.html
- GETRUSAGE(2)
http://www.kernel.org/doc/man-pages/online/pages/man2/getrusage.2.html
- The Linux Programming Interface
§26.1.6 The wait3() and wait4() System Calls
- Python Documentation
http://docs.python.org/2/library/os.html
http://docs.python.org/2/library/resource.html