Skip to content

Instantly share code, notes, and snippets.

@unicorn667
unicorn667 / rela_ab_cd
Last active December 8, 2019 15:23
relational algebra gist for test
group: R1 R2
description[[ casual test
]]
R1 = { A B
1 2
3 4
@unicorn667
unicorn667 / emp_dept_oracle
Last active October 21, 2019 18:50
emp depnto
group: emp deptno
description[[ from oracle example database
]]
dept = { deptno dname loc
10 ACCOUNTING NEW_YORK
20 RESEARCH DALLAS
@unicorn667
unicorn667 / SQL_COOKBOOK_TABLE.sql
Last active October 21, 2019 17:06 — forked from YujiShen/SQL_COOKBOOK_TABLE.sql
Table EMP and DEPT of SQL Cookbook for MySQL
CREATE TABLE emp (
empno decimal(4,0) NOT NULL,
ename varchar(10) default NULL,
job varchar(9) default NULL,
mgr decimal(4,0) default NULL,
hiredate date default NULL,
sal decimal(7,2) default NULL,
comm decimal(7,2) default NULL,
deptno decimal(2,0) default NULL
);
I copyied the cert files in /var/snap/nextcloud/current/certs/custom/
and then
sudo nextcloud.enable-https custom -s cert.pem privkey.pem chain.pem
@unicorn667
unicorn667 / keepalived.conf
Created December 4, 2017 09:57
keepalived with haproxy ha, slave
# Keepalived process identifier
lvs_id haproxy_DH_passive
}
# Script used to check if HAProxy is running
vrrp_script check_haproxy {
script "killall -0 haproxy"
interval 2
weight 2
}
# Virtual interface
@unicorn667
unicorn667 / keepalived.conf
Created December 4, 2017 09:55
keepalived with haproxy ha, master
# Keepalived process identifier
lvs_id haproxy_DH
}
# Script used to check if HAProxy is running
vrrp_script check_haproxy {
script "killall -0 haproxy"
interval 2
weight 2
}
# Virtual interface
@unicorn667
unicorn667 / haproxy.cfg
Created December 4, 2017 09:53
Exchange 2013 haproxy TCP Loadbalancing
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
@unicorn667
unicorn667 / nginx.conf
Created October 24, 2017 12:01 — forked from Brainiarc7/nginx.conf
Nginx reverse proxy to Exchange 2010/2013
server {
listen 80;
#listen [::]:80;
server_name mail.gwtest.us autodiscover.gwtest.us;
return 301 https://$host$request_uri;
}
server {
listen 443;
#listen [::]:443 ipv6only=on;