openssl genrsa -out server.key 2048
openssl req -new -x509 -key server.key -out server.pem -days 3650
| package main | |
| // using asymmetric crypto/RSA keys | |
| import ( | |
| "crypto/rsa" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "net/http" |
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "io" | |
| "log" | |
| "mime/multipart" | |
| "net/http" | |
| "os" |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "path" | |
| ) | |
| func main() { |
| package main | |
| import ( | |
| "log" | |
| "runtime" | |
| ) | |
| // Reference: http://stackoverflow.com/questions/19847594/how-to-reliably-detect-os-platform-in-go | |
| func main() { | |
| log.Printf("%v\n", runtime.GOOS) // output windows or linux |
| <html> | |
| <head> | |
| <script src="/static/jqwidgets-ver4.1.2/scripts/jquery-2.2.4.min.js"></script> | |
| <script> | |
| $( document ).ready(function() { | |
| var token = ""; | |
| // Global AJAX Configuration | |
| $.ajaxSetup({ | |
| type: 'post', |
| Compile the latest Vim 7.4 on CentOS 7 | |
| # yum install gcc make ncurses ncurses-devel | |
| # yum install ruby ruby-devel lua lua-devel luajit \ | |
| luajit-devel ctags git python python-devel \ | |
| python3 python3-devel tcl-devel \ | |
| perl perl-devel perl-ExtUtils-ParseXS \ | |
| perl-ExtUtils-XSpp perl-ExtUtils-CBuilder \ | |
| perl-ExtUtils-Embed |
| /// <summary> | |
| /// AskAlert expects a return value of AlertResult.YES or AlertResult.NO | |
| /// </summary> | |
| public override AlertResult AskAlert(SimplyMessage message) | |
| { | |
| Console.WriteLine(message.Message); | |
| if ((new Regex(@"^You did not enter an amount on the invoice")).Match(message.Message).Success) | |
| { | |
| return AlertResult.YES; |
| package main | |
| import ( | |
| "net/http" | |
| "database/sql" | |
| "fmt" | |
| "log" | |
| "os" | |
| ) |