Skip to content

Instantly share code, notes, and snippets.

View dongalor's full-sized avatar
💻
coding

Garblovian dongalor

💻
coding
View GitHub Profile
@dongalor
dongalor / MinecraftService.md
Created January 14, 2023 11:53 — forked from dotStart/MinecraftService.md
Systemd services for Minecraft Servers

Minecraft systemd Services

This gist contains service descriptors which may be used to automatically start and re-start Minecraft servers using systemd. This allows proper control of your server startup on modern Linux distributions and will automatically manage all required tasks on startup for you.

Requirements

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
@dongalor
dongalor / i3 config
Created August 9, 2021 21:47 — forked from marcusscomputer/i3 config
marcus-s i3 config
# Modifier Key (Super)
set $mod Mod4
# No mouse focus
focus_follows_mouse no
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:Noto Sans 11
@dongalor
dongalor / rails-5-6-ubuntu-mina-puma-nginx.md
Created June 22, 2020 17:06 — forked from wafiq/rails-5-6-ubuntu-mina-puma-nginx.md
How to deploy Rails 5/6 in Ubuntu VM using Mina deployment with Puma webserver and Nginx

Rails 5 and 6 Deployment with Ubuntu, Mina, Puma and Nginx

Based on this tutorial but simplified and inlined. Particularly removed any Rails and 3rd party services part, assumed you just need deployment to any Ubuntu machine.

Prerequisite

  1. A functional Rails app
  2. Hosted Git repository (Github, Bitbucket, Gitlab)
  3. Cloud hosting account (Digital Ocean, Vultr, Linode, Lightsail)
  4. Local SSH account

install nodejs

sudo apt-get update
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs yarn
@dongalor
dongalor / 1 setup vps
Created November 29, 2018 11:34 — forked from PavloBezpalov/1 setup vps
Deploy Rails 5.1.1 to VPS(Ubuntu 16.04.2 LTS). Nginx mainline + pagespeed, Puma with Jungle, Capistrano3, PostgreSQL 9.6, RVM, Certbot
root# apt-get update
root# apt-get upgrade
// dependencies for Ruby
root# apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev \
libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev \
libpcre3-dev unzip
// Node.js v7
root# curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
@dongalor
dongalor / ID.js
Created January 23, 2018 16:39
ID - a unique ID/name generator for JavaScript
// Generate unique IDs for use as pseudo-private/protected names.
// Similar in concept to
// <http://wiki.ecmascript.org/doku.php?id=strawman:names>.
//
// The goals of this function are twofold:
//
// * Provide a way to generate a string guaranteed to be unique when compared
// to other strings generated by this function.
// * Make the string complex enough that it is highly unlikely to be
// accidentally duplicated by hand (this is key if you're using `ID`
@dongalor
dongalor / rvm_apache_passenger.txt
Created March 13, 2017 19:31 — forked from bradmontgomery/rvm_apache_passenger.txt
RVM + Apache + passenger setup for Ubuntu
# Install rvm system-wide
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
# Update the packages
apt-get update
apt-get upgrade
apt-get install build-essential
# get the packages required by ruby
rvm pkg install zlib
@dongalor
dongalor / synchronet-install
Created April 8, 2016 03:31 — forked from phuckewe/synchronet-install
Steps for successfully installing Synchro.NET BBS on Linux Ubuntu 14.04 (Digital Ocean)
I made these steps using the tools provided by DigitalOcean, but these steps should work verbatim on any Ubuntu Server.
Download Terminfo: http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/install/terminfo
Download Termcap: http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/install/termcap
I. Pre-Requisites:
apt-get update
apt-get install make g++ linux-libc-dev libncurses5-dev libnspr4-dev cvs libcap2-dev gdb zip unzip lrzsz gkermit
apt-get install dosemu
II. BBS Install:
@dongalor
dongalor / digital_ocean_setup.md
Created February 28, 2016 08:49 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions

DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

SSH into Root

$ ssh root@123.123.123.123

Change Root Password