This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The command below creates a tgz file with all emails for [email protected] in .eml format: | |
# execute as root | |
/opt/zimbra/bin/zmmailbox -z -m [email protected] getRestURL "//?fmt=tgz" > /tmp/account.tgz | |
# You can do the same via a REST URL: | |
wget http://ZIMBRA.SERVER/home/[email protected]/?fmt=tgz | |
# to restore email: | |
/opt/zimbra/bin/zmmailbox -z -m [email protected] postRestURL "//?fmt=tgz&resolve=reset" /tmp/account.tgz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/md5" | |
"crypto/rand" | |
"errors" | |
"flag" | |
"fmt" | |
"io" | |
"net" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Exim config | |
a. Global settings: | |
dmarc_history_file = /var/spool/exim/dmarc_history.txt | |
dmarc_tld_file = /etc/exim/opendmarc.tlds | |
b. Get the tld file (list of valid TLD's) from http://publicsuffix.org/list/ | |
c. Somewhere early in the RCPT ACL I have: | |
.include_if_exists /etc/exim/dmarc_acl_control.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Create Kubernetes user. Require cfssl. | |
# | |
# Usage: | |
# ./create-user.sh <kubernetes api host> <fulle name> <clusterrole> | |
# | |
# Example: | |
# ./create-user.sh k8s-api.my-domain.com "Jane Doe" my-project:admin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty | |
# more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua | |
http { | |
lua_package_path "/etc/nginx/include.d/?.lua;;"; | |
lua_socket_pool_size 100; | |
lua_socket_connect_timeout 10ms; | |
lua_socket_read_timeout 10ms; | |
server { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# ./tts.py hello world | |
import requests, string, os | |
from playsound import playsound | |
from sys import argv | |
text = ( | |
" ".join(argv[1:]).lower().translate(str.maketrans("", "", string.punctuation)).split(" ") | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: maintenance-page | |
data: | |
maintenance.html: |- | |
<!--HTML GOES HERE--> | |
<!doctype html> | |
<title>Site Maintenance</title> | |
<link rel="stylesheet" href="maintenance.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================================ | |
============================================ | |
============================================ | |
This does what it should: | |
regex: (.+?)(:80)? | |
Also see https://golang.org/pkg/regexp/syntax/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SOURCE: https://starship.rs/config | |
# DEBUG via: `starship explain` | |
# Timeout for commands executed by starship (ms) | |
command_timeout = 2000 | |
# Replace the "❯" | |
[character] | |
success_symbol = "[λ](green)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.6" | |
services: | |
promtail: | |
image: grafana/promtail:1.4.0 | |
container_name: promtail | |
command: [ "-config.file=/etc/promtail/local-config.yaml" ] | |
volumes: | |
- './promtail.yml:/etc/promtail/local-config.yaml:ro' | |
- '__path_to_logs_directory__:/app/log:ro' |