Skip to content

Instantly share code, notes, and snippets.

@adowning
adowning / monstache
Last active September 14, 2021 08:51
apt update
apt install build-essentials git
sudo apt-get install -y zsh
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sudo apt install -y default-jdk default-jre
sudo echo 'export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64' > /etc/environment
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
#!/bin/bash
sudo apt update
sudo apt install -y apt-transport-https openjdk-8-jre-headless
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-6.x.list
sudo apt update && sudo apt install -y elasticsearch
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service
@adowning
adowning / tile38.service
Created December 15, 2019 15:08 — forked from mithereal/tile38.service
tile38 systemd script
[Unit]
Description=Advanced Geolocation store
After=network.target
Documentation=http://tile38.com/documentation/, man:redis-server(1)
[Service]
Type=forking
ExecStart=/srv/geodb/tile38-server
PIDFile=/var/run/tile38/tile38-server.pid
TimeoutStopSec=0
@adowning
adowning / Procfile
Created November 29, 2019 06:34 — forked from revant/Procfile
Use node server with frappe-bench
redis_cache: redis-server config/redis_cache.conf
redis_socketio: redis-server config/redis_socketio.conf
redis_queue: redis-server config/redis_queue.conf
web: bench serve --port 8000
socketio: /usr/bin/node apps/frappe/socketio.js
custom_app: /usr/bin/node apps/custom_app/custom_node.js
watch: bench watch
schedule: bench schedule
worker_short: bench worker --queue short
#!/bin/bash
MY_PROGRAM="stelace-core" # For example, "apache2" or "nginx"
MY_USER="ubuntu"
CHECKPOINT="/home/$MY_USER/checkpoint.out"
GSUTIL_OPTS="-m -o GSUtil:parallel_composite_upload_threshold=32M"
BUCKET_NAME="my-checkpoint-files" # For example, "my-checkpoint-files" (without gs://)
echo "Shutting down! Seeing if ${MY_PROGRAM} is running."
@adowning
adowning / README.md
Created November 17, 2019 20:06 — forked from mosquito/README.md
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service

[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service
@adowning
adowning / n8n-install.sh
Last active February 16, 2020 23:12
n8n install
#/!bin/bash
# mkdir /etc/n8n/
echo 'version: "3"
services:
traefik:
image: "traefik"
command:
@adowning
adowning / install-n8n.sh
Created November 7, 2019 03:14
n8n install
#!/bin/bash
apt update
apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
apt update
apt install docker-ce -y
curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
@adowning
adowning / docker-compose-app.service
Created November 6, 2019 02:55
docker-compose-app.service
# /etc/systemd/system/docker-compose-app.service
# thanks to oleg belostotsky on stack overflow for this
[Unit]
Description=Docker Compose Application Service
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
# replace :80 with your domain name to get automatic https via LetsEncrypt
hasura.ashdevtools.com {
proxy / graphql-engine:8080 {
websocket
}
}