Skip to content

Instantly share code, notes, and snippets.

Mystical Tech mysticaltech

Block or report user

Report or block mysticaltech

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mysticaltech
mysticaltech / pi3_browser-only.md
Created Apr 8, 2019 — forked from bheisig/pi3_browser-only.md
Run Raspberry 3 in digital signage mode with Chromium Web browser on a TV screen
View pi3_browser-only.md
@mysticaltech
mysticaltech / redis_cheatsheet.bash
Created Jan 4, 2019 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
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.
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"
export ELASTICSEARCH_IMAGE_VERSION="5.6.12"
dokku elasticsearch:create lollipop
This will result in the "unable to connect" error. But now worries.
@mysticaltech
mysticaltech / gist:47a61af3af9550ae80b683dcd7bacea5
Created Dec 11, 2018 — 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
@mysticaltech
mysticaltech / gist:4adea4c15a2b1147f0be49ea7ff41b92
Last active Dec 3, 2018
Automatically renew Certbot certificate using cron
View gist:4adea4c15a2b1147f0be49ea7ff41b92
sudo crontab -e
# And copy paste:
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(3600))' && certbot -q renew
@mysticaltech
mysticaltech / gist:639d7dfd4dd7e76d060d71064711f53e
Created Dec 2, 2018 — 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: 127.0.0.1 localhost yourhostname
  4. Run Sendmail's config and answer 'Y' to everything: sudo sendmailconfig
  5. Restart apache sudo service apache2 restart
@mysticaltech
mysticaltech / tvncserver
Created Oct 3, 2018
/etc/rc.d/init.d/ file to add TurboVNC as a service on centos
View tvncserver
#!/bin/bash
#
# 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.
#
### BEGIN INIT INFO
@mysticaltech
mysticaltech / Dockerfile
Created Mar 27, 2018 — forked from tmaiaroto/Dockerfile
WordPress on Amazon ECS
View Dockerfile
FROM alpine:3.3
MAINTAINER Tom Maiaroto <tom@outdoorsy.co>
# Install packages
RUN apk --update --repository http://dl-3.alpinelinux.org/alpine/edge/main add \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
libwebp-dev \
php7 \
@mysticaltech
mysticaltech / ubuntu_unattended_upgrades_gmail.markdown
Created Feb 13, 2018 — forked from roybotnik/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:

We couldn’t find that file to show.
You can’t perform that action at this time.