For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
#Create a Network Security Group | |
New-AzureNetworkSecurityGroup -Name "DMZ_NSG" -Location Southeast Asia -Label "DMZ NSG SEVNET" | |
#Add, Update Rules to a NSG | |
Get-AzureNetworkSecurityGroup -Name "DMZ_NSG" | Set-AzureNetworkSecurityRule -Name RDPInternet-DMZ -Type Inbound -Priority 347 -Action Allow -SourceAddressPrefix 'INTERNET' -SourcePortRange '63389' -DestinationAddressPrefix '10.0.2.0/25' -DestinationPortRange '63389' -Protocol TCP | |
#Delete a rule from NSG | |
Get-AzureNetworkSecurityGroup -Name "DMZ_NSG" | Remove-AzureNetworkSecurityRule -Name RDPInternet-DMZ | |
#Associate a NSG to a Virtual machine |
#!/bin/bash | |
# | |
# Automatic update for made-in-ovh OVH kernels. | |
# | |
# VERSION :0.2 | |
# DATE :2015-02-10 | |
# AUTHOR :Viktor Szépe <[email protected]> | |
# LICENSE :The MIT License (MIT) | |
# URL :https://github.com/szepeviktor/debian-server-tools | |
# BASH-VERSION :4.2+ |
# References: | |
# http://blog.mixu.net/2011/08/13/nginx-websockets-ssl-and-socket-io-deployment/ | |
# http://blog.exceliance.fr/2012/09/10/how-to-get-ssl-with-haproxy-getting-rid-of-stunnel-stud-nginx-or-pound/ | |
# | |
global | |
nbproc 2 | |
maxconn 16384 | |
defaults |
# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf | |
server { | |
listen 80; | |
server_name jira.example.com; | |
access_log off; | |
return 301 https://$server_name$request_uri; | |
} | |
# /etc/nginx/conf.d/jira.conf | |
server { |
$ go build -a -tags netgo -installsuffix netgo . | |
$ CGO_ENABLED=0 go build -a -installsuffix nocgo . |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
# swith to sudo | |
sudo -i | |
# create swap | |
touch /2GiB.swap | |
chattr +C /2GiB.swap | |
fallocate -l 2048m /2GiB.swap | |
chmod 600 /2GiB.swap | |
mkswap /2GiB.swap |
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"fmt" | |
"io" | |
"log" | |
) |
/** | |
* HipChat client for Google Apps Script. | |
* This code is based on node-hipchat https://github.com/nkohari/node-hipchat/blob/master/lib/hipchat.js | |
*/ | |
(function(global) { | |
var HipChatClient = (function () { | |
HipChatClient.prototype.host = 'api.hipchat.com'; | |
function HipChatClient(apikey) { |
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"flag" | |
"io/ioutil" | |
"log" | |
"net/http" | |
) |