Skip to content

Instantly share code, notes, and snippets.

View dreamingbinary's full-sized avatar
💭
I love to build

Charles Le dreamingbinary

💭
I love to build
  • Los Angeles, Earth.
View GitHub Profile
@dreamingbinary
dreamingbinary / all_aws_lambda_modules_python.md
Last active October 2, 2019 18:42 — forked from gene1wood/all_aws_lambda_modules_python.md
AWS Lambda function to list all available Python modules for Python 3.7

This gist contains lists of modules available in

in AWS Lambda.

It also contains the code to run in Lambda to generate these lists. In addition there is a less_versbose module in the code that you can call to get a list of the top level modules installed and the version of those modules (if they contain a version in the module)

@dreamingbinary
dreamingbinary / find_user_from_access_key.py
Created September 9, 2018 21:08 — forked from andymotta/find_user_from_access_key.py
Find an AWS IAM user corresponding to an AWS Access Key (boto3)
# Find the IAM username belonging to the TARGET_ACCESS_KEY
import boto3
from botocore.exceptions import ClientError
iam = boto3.client('iam')
def find_user(key):
try:
key_info = iam.get_access_key_last_used(AccessKeyId=key)
#!/usr/bin/env python
'''
This is a high level basic example of roles
'''
from fabric.api import *
@task
def load_hosts(region='region'):
@dreamingbinary
dreamingbinary / introrx.md
Created April 19, 2018 22:31 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@dreamingbinary
dreamingbinary / gist:78cf868339b1b222b605339f60550782
Last active January 2, 2018 07:25
SSH PUBLIC KEY - cle-mbprt
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDJh8yLFcPuFh6ABHE108B/qUGnsMgkxatwc8tv05kUZv/EDoHd9SzBR8WFK9iB0so6R9Km8uDn7C2bVF9Y7ANaC+avBZrqMo9VGDuHhDRh0pjP3QSzun87gEYSvXQnh1x9AZfDuqoJaGQc1B4EAMsEUZzkqFS43/8pa61Rs0mnoh7iKI8sOOK8RweFGcNXVcdpvRhEOWOhAAFcr1ufR/v2hTMrgRnKXYVeaF071RuWDg0sO198wMVWchqksUmh894PrfT1it8RmgjLyQOgoqDVndCPsTnazmFvDIdSYCf46/PbVBirodEZynbfwqOEGGUNhKwuleJ0QlaGy5r45Zni7+9dbXUtPeCT0CQteOZJZhkF+OlDczFXbbwIfZ89q2FHi4ubmZMvZjsXGjvQDbWSFYFFNdWx+6PUnpmtoRX1hSUHwaSX84m9zXLNJf/fyTRLoGjoQuJ4ikH2csd2qQOO/OGMNfuZQkxhqA2B0tdpypPs18QsgwvSPXcGXUMRarn0/inpNqw0UWtnTmKPnORGS3Am+TR1PzKvpV4ZVdc3OD+QKqmrnzzPlX1rxfbdCDvAHkvq21YiLlamZu9rilk4R0szJj4ZySlqYLsW6pmYhc7N+4AS3oMZ8MktqdMh3+iqKSoaDNBbcnJ1idlnRadNJD1DCYFLoBDp0QJiFh2ZkQ== (cle-mbprt)

Keybase proof

I hereby claim:

  • I am dreamingbinary on github.
  • I am dreamingbinary (https://keybase.io/dreamingbinary) on keybase.
  • I have a public key whose fingerprint is 7975 E06A 475A 311F BF0A A735 3D23 2410 B0F1 A915

To claim this, I am signing this object:

@dreamingbinary
dreamingbinary / stripe_analytics.py
Created February 22, 2017 08:14
Jorge's Stripe Analytics File
import os
import string
import json
R=[]
ii=0
data_id='#######################'
found=0
while ii<2000:
if ii>=0:
modstart='-d starting_after='+str(data_id)+''
import requests
import time
import json
token = ''
#Delete files older than this:
ts_to = int(time.time()) - 30 * 24 * 60 * 60
def list_files():
@dreamingbinary
dreamingbinary / .wakeup
Created September 6, 2016 17:43 — forked from ralph089/.wakeup
Restarts Bluetooth Module on Mac OS X El Capitan. You can use the script as shortcut to restart Bluetooth on demand or you can use it with "SleepWatcher" to automatically restart Bluetooth on wakeup (See README.md). I created it, because my Logitech Bluetooth Mouse doesn't stay connected after sleep-mode, so i had to manually re-pair my mouse.
#!/bin/bash
#
# Restart Bluetooth Module on Mac OS X
#
# Requires Blueutil to be installed: http://brewformulas.org/blueutil
BT="/usr/local/bin/blueutil"
log() {
echo "$@"
<!DOCTYPE html>
<html>
<body>
<?php
if(!isset($_POST['test_field'])) {
print $_POST['test_field'];
}
?>
<form method="POST" action="<?PHP print $_SERVER['PHP_SELF']; ?>">