Skip to content

Instantly share code, notes, and snippets.

@ravituvar
ravituvar / docker-cleanup-resources.md
Created July 17, 2019 09:40 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@ravituvar
ravituvar / mailserver.md
Created December 24, 2018 09:44
Mailserver on Linux (Postfix and Dovecot)
@ravituvar
ravituvar / Mail Server on Ubuntu 14.04
Created December 24, 2018 08:40 — forked from topwebmaster/Mail Server on Ubuntu 14.04
Settings Linux mint after fresh install for php developing
https://www.exratione.com/2014/05/a-mailserver-on-ubuntu-1404-postfix-dovecot-mysql/
Ex
Ratione
GitHub • Consulting • Blog • Archives • Feed
A Mailserver on Ubuntu 14.04: Postfix, Dovecot, MySQL
By Reason May 1, 2014 Permalink
This long post contains a recipe for building a reasonably secure Ubuntu 14.04 mail server in Amazon Web Services, using Postfix, Dovecot, and MySQL, with anti-spam packages in the form of amavisd-new, Clam AntiVirus, SpamAssassin, and Postgrey. Local users are virtual rather than being system users. Administration of users and domains is achieved through the Postfix Admin web interface. Webmail is provided by Roundcube.
@ravituvar
ravituvar / postfix.sh
Created December 18, 2018 17:15 — forked from ddepaoli3/postfix.sh
Install postfix server on aws linux ami
#!/bin/bash
DOMAIN=example.com
USERNAME=admin
# Configure hostname
sed s/"127.0.0.1 localhost"/"127.0.0.1 $DOMAIN localhost"/ -i /etc/hosts
sed s/HOSTNAME.*/HOSTNAME=$DOMAIN/ -i /etc/sysconfig/network
# Intall server and mutt
@ravituvar
ravituvar / screenshotCompare.js
Created December 18, 2018 17:13 — forked from spockNinja/screenshotCompare.js
UI Screenshot Comparison Lambda Function
'use strict';
console.log('Loading function');
var AWS = require('aws-sdk');
var fs = require('fs');
var https = require('https');
var spawn = require('child_process').spawn;
var util = require('util');
AWS.config.apiVersions = {
@ravituvar
ravituvar / ansibleSetupPostfixSES.yml
Created December 18, 2018 17:12 — forked from l0neranger/ansibleSetupPostfixSES.yml
Ansible Playbook - Postfix for SES Delivery
#
# According to AWS Docs - http://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html
#
# Rewrites all sender addresses to a single canonical ses verified address.
#
# Expects a vars files at ../vars/PostfixSES-vars.yml with the following variables:
# - ses_host: email-smtp.us-west-x.amazonaws.com
# - ses_port: 587
# - ses_username: ses-smtp-username
# - ses_password: ses-smtp-password
@ravituvar
ravituvar / receving-mail-server.json
Created December 18, 2018 17:11 — forked from mechamogera/receving-mail-server.json
メール受信環境を構築するCloudFormationテンプレート
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Mail server for receiving",
"Parameters" : {
"MailServerDomain" : {
"Type" : "String",
"Default" : "mail.example.com",
"Description" : "mail server domain"
},
#!/bin/bash
#Configuring postfix to use aws ses as a gateway.
#https://gist.github.com/JohnMorales/d554e227146735217536462141fc6898
#update via `gist -u d554e227146735217536462141fc6898 config_mail.sh`
# Configuring postfix.
if [ -z "$AWS_ACCESS_KEY_ID" ]; then
echo "Must have AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY set"
exit 1
fi
key gen : NAVN-AUQL-LP2V-3GAJ
request code :
o3oHEuwvhh7v+A6TLNtma5KLZ55NHaj+RM9q/Th9FzsBJuwRWIf30ZqRFzhaHdPKyX8wMH+IENxrzetMa1egQLU11okKTpWJnkpBPJ7mpzRYF6pntD81ffxXuOZDuhuUruvGZNRtwJVpvckuYpH1BJgDP+xfprftjSGjxpOzyyNXu14gXEdWpsj4Z616WNfaPqwXcEIHKx4Xw64Bb6oT6NeT22SuWlKX7bLCU7jStjFPoziw
activation code:
IaBiNBLlJi40BYfmC8+bt2+y6fEBCLEPS9sngItbIsH+w/akZGWssMqLCxNkF/eXpoKgIJ6DH4KNoxhtR1PToWWw863yInFTMbv4WBnwxEN3hemyvxqTHLda6oskxFH3tg+qkEFAfOC7FalnFn/J+2lg71GQssZsKMxHn+JonsC+K3al2IU4lNga7sFE41La58NL/lZh2VidNwp1fAAFIadtjwLtvYaRJbbjdxOW9PGPbAJTEvQb2UnMyeyIdDWx9m1b232rAKMSI5fqkO9RLu48FkadwAZA0QrvZ1FYKIwKn+9g6r0lmNfTOUcRIAR2cEV/jQmz9khvd+V81+RGxw==
#!/bin/bash
export LANG="en_US.UTF-8"
rm -Rf ~/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat*
rm -Rf ~/Library/Caches/com.prect.NavicatPremium
rm -Rf ~/Library/Preferences/com.prect.NavicatPremium.plist
sudo rm -Rf /Applications/Navicat\ Premium.app/