Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096| #!/bin/bash | |
| ###### For generate_certs.sh script ###### | |
| export COUNTRY=US | |
| export STATE=California | |
| export CITY=Irvine | |
| export ORGANIZATION=YourCompany | |
| export UNIT=YourBU | |
| export COMMON_NAME=server.example.com | |
| export SAN_NAME_1=server.example.com |
| package main | |
| import ( | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/x509" | |
| "crypto/x509/pkix" | |
| "encoding/pem" | |
| "fmt" | |
| "math/big" |
| #include<iostream> | |
| #include<algorithm> | |
| #include <stdio.h> | |
| using namespace std; | |
| #define COUNT 1501 | |
| int father[COUNT]; | |
| int childcnt[COUNT]; | |
| int n; |
| #include<iostream> | |
| #include<algorithm> | |
| using namespace std; | |
| typedef struct Node | |
| { | |
| Node*left; | |
| Node*right; | |
| int value; | |
| int height; |
| git config --global color.status auto | |
| git config --global color.diff auto | |
| git config --global color.branch auto | |
| git config --global color.interactive auto |
| #include <ev.h> | |
| #include <unistd.h> | |
| #include <stdio.h> // for puts | |
| // every watcher type has its own typedef'd struct | |
| // with the name ev_TYPE | |
| ev_io stdin_watcher; | |
| ev_timer timeout_watcher; | |
| // all watcher callbacks have a similar signature |
| #include<stdio.h> | |
| #include <getopt.h> | |
| int flag; | |
| struct option long_options[] = { | |
| { "deamon", no_argument, NULL, 'D' }, | |
| { "loglevel", required_argument, NULL, 'L' }, | |
| { "ip", required_argument,&flag, 1 }, | |
| { "port", required_argument, &flag, 2 }, | |
| }; |
| git config --global user.name "" | |
| git config --global user.email "" | |
| git config --global color.ui auto | |
| git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
| #!/bin/bash | |
| function show_elapsed_time() | |
| { | |
| user_hz=$(getconf CLK_TCK) #mostly it's 100 on x86/x86_64 | |
| pid=$1 | |
| jiffies=$(cat /proc/$pid/stat | cut -d" " -f22) | |
| sys_uptime=$(cat /proc/uptime | cut -d" " -f1) | |
| last_time=$(( ${sys_uptime%.*} - $jiffies/$user_hz )) | |
| lastday=$(( $last_time/3600/24 )) | |
| lasthour=$(( ($last_time-$lastday*3600*24)/3600 )) |