Skip to content

Instantly share code, notes, and snippets.

View mysticaltech's full-sized avatar

K. N. mysticaltech

  • Spain
View GitHub Profile
mysticaltech / com.universalmediaserver.ums.plist
Last active November 21, 2016 19:20
Make Universal Media Server (UMS) Headless on Mac
View com.universalmediaserver.ums.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
We couldn’t find that file to show.
mysticaltech / ubuntu_unattended_upgrades_gmail.markdown
Created February 13, 2018 15:49 — forked from roydq/ubuntu_unattended_upgrades_gmail.markdown
Unattended upgrades on Ubuntu 14.04 with email notifications
View ubuntu_unattended_upgrades_gmail.markdown

Getting Started

Do yourself a favor and login as root to save yourself some time and headaches:

$ sudo su -

Install unattended-upgrades:

mysticaltech / Dockerfile
Created March 27, 2018 14:07 — forked from tmaiaroto/Dockerfile
WordPress on Amazon ECS
View Dockerfile
FROM alpine:3.3
MAINTAINER Tom Maiaroto <>
# Install packages
RUN apk --update --repository add \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
libwebp-dev \
php7 \
mysticaltech / gist:639d7dfd4dd7e76d060d71064711f53e
Created December 2, 2018 22:48 — forked from adamstac/gist:7462202
Install and configure Sendmail on Ubuntu
View gist:639d7dfd4dd7e76d060d71064711f53e

Install and configure Sendmail on Ubuntu

This should help you get Sendmail installed with basic configuration on Ubuntu.

  1. If sendmail isn't installed, install it: sudo apt-get install sendmail
  2. Configure /etc/hosts file: nano /etc/hosts
  3. Make sure the line looks like this: localhost yourhostname
  4. Run Sendmail's config and answer 'Y' to everything: sudo sendmailconfig
  5. Restart apache sudo service apache2 restart
mysticaltech / gist:4adea4c15a2b1147f0be49ea7ff41b92
Last active December 3, 2018 00:37
Automatically renew Certbot certificate using cron
View gist:4adea4c15a2b1147f0be49ea7ff41b92
sudo crontab -e
# And copy paste:
0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(3600))' && certbot -q renew
mysticaltech / gist:47a61af3af9550ae80b683dcd7bacea5
Created December 11, 2018 00:41 — forked from giannisp/gist:ebaca117ac9e44231421f04e7796d5ca
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
View gist:47a61af3af9550ae80b683dcd7bacea5
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
View elasticsearch 5.x on Dokku
All right, just a quick recap on this issue for people looking to setup Elasticsearch 5.x. There's a workable solution in the above comments, but was a bit of trial an error. Hope this speeds things up for others:
Edit /etc/sysctl.conf, add vm.max_map_count = 262144 at the bottom. Then run sysctl -p to load the changes.
Create a new Elasticsearch instance with dokku, per manual. I've only tested this with the latest 5.x release.
export ELASTICSEARCH_IMAGE="elasticsearch"
dokku elasticsearch:create lollipop
This will result in the "unable to connect" error. But now worries.
mysticaltech / redis_cheatsheet.bash
Created January 4, 2019 21:07 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION -->
View redis_cheatsheet.bash
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
mysticaltech / tvncserver
Created October 3, 2018 18:19
/etc/rc.d/init.d/ file to add TurboVNC as a service on centos
View tvncserver
# chkconfig: - 91 35
# description: Starts and stops the TurboVNC Server
### If you are using LDAP or another distributed authentication system, then
### be sure to add any services needed for your distributed authentication
### system to the Required-Start line below.