cd /etc/rspamd- create
rspamd.conf.local - create lists:
touch local_bl_from.map.inc local_bl_ip.map.inc local_bl_rcpt.map.inc \
local_wl_from.map.inc local_wl_ip.map.inc local_wl_rcpt.map.inc- change permissions:
| package main | |
| // Modified to accept password and salt as arguments | |
| //https://gist.github.com/osiloke/186a0feb6e203afa01c11d43439a383f | |
| import ( | |
| "crypto/sha512" | |
| "encoding/base64" | |
| "fmt" | |
| "math/rand" |
| # run this as root | |
| while [ 1 ]; do echo | nc -l -U /tmp/reload_nginx && /etc/init.d/nginx reload; done | |
| # or as an upstart job | |
| script | |
| echo | nc -l -U /tmp/reload_nginx && /etc/init.d/nginx reload | |
| end script | |
| respawn | |
| # now any process can run this or do the equivalent with sockets to trigger reload |
| CREATE TABLE public.gapless_sequence ( | |
| sequence_schema TEXT, | |
| sequence_name TEXT, | |
| last_value BIGINT DEFAULT 0, | |
| step INTEGER DEFAULT 1 | |
| ); | |
| ALTER TABLE public.gapless_sequence | |
| ADD CONSTRAINT gapless_sequence_pk PRIMARY KEY (sequence_schema, sequence_name); |
| #!/bin/bash | |
| dn="dc=example,dc=com" | |
| ldap_server='192.168.1.1' | |
| group_name='group' | |
| available_uidNumber=`expr $(ldapsearch -x -b ${dn} -h ${ldap_server} '(objectClass=posixAccount)' uidNumber | grep "uidNumber: " | sed "s|uidNumber: ||" | uniq | sort -n | tail -n 1) + 1 ` | |
| echo ${available_uidNumber} | |
| available_gidNumber=`expr $(ldapsearch -x -b ${dn} -h ${ldap_server} '(objectClass=posixGroup)' gidNumber | grep "gidNumber: " | sed "s|gidNumber: ||" | uniq | sort -n | tail -n 1) + 1 ` | |
| echo ${available_gidNumber} |
| location ~* \.(txt|log|xml|css|js)$ { | |
| add_header X-Robots-Tag noindex; | |
| } |
| -- Create a group | |
| CREATE ROLE readaccess; | |
| -- Grant access to existing tables | |
| GRANT USAGE ON SCHEMA public TO readaccess; | |
| GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
| -- Grant access to future tables | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
The git command-line utility has plenty of inconsistencies http://steveko.wordpress.com/2012/02/24/10-things-i-hate-about-git/
A GUI like http://sourcetreeapp.com is often helpful, but staying on the command line usually quicker. This is a list of the commands I use most frequently, listed by funcional category:
git status list which (unstaged) files have changed