create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
package main | |
import ( | |
"context" | |
"crypto/tls" | |
"google.golang.org/grpc" | |
"google.golang.org/grpc/credentials" | |
) |
# Recommended minimum configuration: | |
acl manager proto cache_object | |
acl localhost src 127.0.0.1/32 | |
acl to_localhost dst 127.0.0.0/8 | |
# Specify incoming networks of incoming traffic | |
acl localnet src 0.0.0.0/0 192.168.100.0/24 192.168.101.0/24 10.0.0.0/8 | |
acl SSL_ports port 443 | |
acl Safe_ports port 80 # http |
#Recommended minimum configuration: | |
acl manager proto cache_object | |
acl localhost src 127.0.0.1/32 | |
acl to_localhost dst 127.0.0.0/8 | |
acl localnet src 0.0.0.0/0 192.168.100.0/24 192.168.101.0/24 | |
acl SSL_ports port 443 | |
acl Safe_ports port 80 # http | |
acl Safe_ports port 21 # ftp | |
acl Safe_ports port 443 # https | |
acl Safe_ports port 70 # gopher |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
) | |
func fetch_url(url string, responses *chan string) { |
from datetime import datetime | |
import logging | |
import asyncio | |
from aiohttp import web | |
import requests | |
logger = logging.getLogger() | |
@asyncio.coroutine |
import gevent | |
from gevent import monkey | |
monkey.patch_all() | |
import requests | |
def fetch_request(url): | |
print("fetching %s" % url) | |
requests.get(url) | |
print("Finish fetching %s" % url) |
import argparse | |
import multiprocessing | |
import threading | |
from pylibmc.test import make_test_client | |
import random | |
NUM_THREADS = 2 | |
NUM_PROCS = 4 | |
NUM_SETS = 10000 |
#!/bin/bash | |
case $1 in | |
pg_stat_activity) | |
sudo -u postgres psql -t -c "select $3 from pg_stat_activity where datname='$2' ;" | head -1 | sed s/\ \\+//g | |
;; | |
pg_stat_database) | |
sudo -u postgres psql -t -c "select $3 from pg_stat_database where datname='$2' ;" | head -1 | sed s/\ \\+//g | |
;; | |
pg_database_size) |
## At the http level | |
map $http_cookie $is_secure { | |
default 0; | |
~SESS 1; # there's a session cookie (use SSL - authenticated user) | |
} | |
map $is_secure $not_secure { | |
1 0; | |
0 1; | |
} |