I hereby claim:
- I am shengis on github.
- I am shengis (https://keybase.io/shengis) on keybase.
- I have a public key ASDNQwDduUpozyIMWvxrI6nWaYHbY5qvtEG241BvnIrD6wo
To claim this, I am signing this object:
| # Backport subprocess.run for Python 3.3 and 3.4 | |
| import subprocess | |
| if not 'run' in subprocess.__all__: | |
| class CompletedProcess(object): | |
| def __init__(self, stdout, stderr, returncode): | |
| self._stdout = stdout | |
| self._stderr = stderr |
| import os | |
| import boto3 | |
| HOSTED_ZONE_ID = "ABCDEF123456789" | |
| DOMAIN_NAME = ".example.lan." | |
| def lambda_handler(): | |
| # Setup Boto3 client | |
| boto3.setup_default_session(region_name='us-east-1') | |
| ec2 = boto3.client("ec2") |
| time_namelookup : %{time_namelookup}\n | |
| time_connect : %{time_connect}\n | |
| time_appconnect : %{time_appconnect}\n | |
| time_pretransfer : %{time_pretransfer}\n | |
| time_redirect : %{time_redirect}\n | |
| time_starttransfer : %{time_starttransfer}\n | |
| ------------------------------------------\n | |
| time_total : %{time_total}\n |
I hereby claim:
To claim this, I am signing this object:
| /* | |
| Needs pam-devel on Fedora to build | |
| Build cmd: gcc -o check_user -lpam -lpam_misc check_user.c | |
| Edited from the example took in Linux-PAM_ADG.txt | |
| Originally contributed by Shane Watts | |
| */ | |
| #include <security/pam_appl.h> | |
| #include <security/pam_misc.h> |
| def one_at_a_time(message): | |
| ''' Decorator for exclusive methods | |
| Using like this: | |
| @one_at_a_time("Deployment or build already running") | |
| def deploy(self, msg, args) | |
| ''' | |
| def mutex_decorator(func): | |
| @wraps(func) | |
| def wraper(self, *args, **kwargs): | |
| if not mutex.locked(): |
| #!/bin/env python | |
| # Test email address | |
| # return code : | |
| # 0 -> OK | |
| # 1 -> Not Valid | |
| # 2 -> Could not connect to mail server | |
| from sys import argv, exit | |
| import dns.resolver |
| // Test terminals color capabilities | |
| package main | |
| import "fmt" | |
| func main() { | |
| const ( | |
| normal = "\033[0m" | |
| color = "\033[%d;%dm" |
| // Connecting to a SMTP server to send an email in Go | |
| // - Support TLS and optional password | |
| // - A CA file can be provided or it will use the CA bundle of your OS | |
| // | |
| // Usage: | |
| // s := smtp.NewSMTP("localhost", "from@example.com", "to@example.com") | |
| // s.SetPort(465) | |
| // s.SetTLS(true) | |
| // s.SetUser("login/user") | |
| // s.SetPassword("password") |
| package mux | |
| import ( | |
| "fmt" | |
| "net/http" | |
| ) | |
| type Middleware struct { | |
| mux *http.ServeMux | |
| middlewares [](func(http.Handler) http.Handler) |