See also, http://libraryofalexandria.io/cgo/
cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.
So, Here collect materials.
See also, http://libraryofalexandria.io/cgo/
cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.
So, Here collect materials.
| package main | |
| import ( | |
| "net/http" | |
| "os" | |
| "bytes" | |
| "path" | |
| "path/filepath" | |
| "mime/multipart" | |
| "io" |
Creating an OAuth2 server is not a task that should be taken lightly. There are many security loopholes that could be exploited, and regular examinations are critical to handle possible vulnerabilities.
Auth is an authentication microservice based on the OAuth2 identity delegation protocol.
| PROJECT = sample-python-app | |
| FUNCTION = $(PROJECT) | |
| REGION = us-east-1 | |
| .phony: clean | |
| clean: | |
| rm -f -r $(FUNCTION)* | |
| rm -f -r site-packages |
| import json | |
| import urllib2 | |
| import sys | |
| import time | |
| from Foundation import NSUserNotification | |
| from Foundation import NSUserNotificationCenter | |
| from Foundation import NSUserNotificationDefaultSoundName | |
| orderId = sys.argv[1] | |
| step = previousStep = None |
| @startuml | |
| ' uncomment the line below if you're using computer with a retina display | |
| ' skinparam dpi 300 | |
| !define Table(name,desc) class name as "desc" << (T,#FFAAAA) >> | |
| ' we use bold for primary key | |
| ' green color for unique | |
| ' and underscore for not_null | |
| !define primary_key(x) <b>x</b> | |
| !define unique(x) <color:green>x</color> | |
| !define not_null(x) <u>x</u> |
| /* | |
| * Genarate rsa keys. | |
| */ | |
| package main | |
| import ( | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/x509" |
| #!/bin/bash | |
| # call this script with an email address (valid or not). | |
| # like: | |
| # ./makecert.sh [email protected] | |
| mkdir certs | |
| rm certs/* | |
| echo "make server cert" | |
| openssl req -new -nodes -x509 -out certs/server.pem -keyout certs/server.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=www.random.com/emailAddress=$1" | |
| echo "make client cert" | |
| openssl req -new -nodes -x509 -out certs/client.pem -keyout certs/client.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=www.random.com/emailAddress=$1" |
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "net" | |
| "net/http" | |
| "os" |