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:
| #!/bin/bash | |
| declare -a JOBS | |
| JOBS=("sleep 1" "sleep 2" "sleep 3") | |
| cleanup() { | |
| trap "" SIGTERM | |
| kill 0 | |
| wait |
| func main() { | |
| running := true | |
| // Make a channel the signal handler will subscribe | |
| sigc := make(chan os.Signal, 1) | |
| // Notify will send a sigint or sigterm signal to the | |
| // the previously created channel `sigc` | |
| signal.Notify(sigc, syscall.SIGINT, syscall.SIGTERM) | |
| go func() { |
| package mux | |
| import ( | |
| "fmt" | |
| "net/http" | |
| ) | |
| type Middleware struct { | |
| mux *http.ServeMux | |
| middlewares [](func(http.Handler) http.Handler) |
| // 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", "[email protected]", "[email protected]") | |
| // s.SetPort(465) | |
| // s.SetTLS(true) | |
| // s.SetUser("login/user") | |
| // s.SetPassword("password") |
| // Test terminals color capabilities | |
| package main | |
| import "fmt" | |
| func main() { | |
| const ( | |
| normal = "\033[0m" | |
| color = "\033[%d;%dm" |
| #!/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 |
| 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(): |
| /* | |
| 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> |
I hereby claim:
To claim this, I am signing this object:
| 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 |