Skip to content

Instantly share code, notes, and snippets.

burningTyger /
Last active Sep 7, 2020
How To Install Moodle via git with Postgres, Nginx and PHP on an Ubuntu 16.04 VPS

How To Install Moodle via git with Postgres, Nginx and PHP on an Ubuntu 16.04 VPS


Moodle is a common online learning platform used in many educational settings around the world. This tutorial aims at giving admins a solid and speedy foundation for serving moodle to a small to medium sized institution. The setup focuses on simple maintenance and fast updates.


  • Create a small droplet with Ubuntu 16.04 (64Bit is great)
  • Follow the tutorial on setting up Ubuntu 16.04
  • git should be installed by default
burningTyger /
Created Mar 7, 2016 — forked from enginefeeder101/
Test outgoing open ports
LC_ALL=C nc -vzw5 $1 2>&1 | grep -v 'Connection timed out'
N=50 # Specify number of ports to check at once
for port in {1..65535}; do # Specify port range to check here
((i=i%N)); ((i++==0)) && wait
burningTyger /
Created Jan 11, 2016
This is my upgrade script for moodle. Has worked flawlessly for the last two years.
# depending on where you keep your moodle files this is how I'm doing it.
# works on any branch, for major upgrade you need to run this file a last time on the current branch
# then cd into the moodle dir and `git branch` into the newer version in order to get
# the latest updates. Then run the script again to activate.
cd /usr/share/nginx/html/moodle
sudo -u www-data php /usr/share/nginx/html/moodle/admin/cli/maintenance.php --enable;git pull
sudo -u www-data php /usr/share/nginx/html/moodle/admin/cli/upgrade.php
sudo -u www-data php /usr/share/nginx/html/moodle/admin/cli/maintenance.php --disable
sudo -u www-data php /usr/share/nginx/html/moodle/admin/cli/cron.php;cd
View .nvimrc
call plug#begin('~/.vim/plugged')
Plug 'kien/ctrlp.vim'
Plug 'ervandew/supertab'
Plug 'scrooloose/syntastic'
Plug 'bronson/vim-trailing-whitespace'
Plug 'bling/vim-airline'
Plug 'airblade/vim-gitgutter'
Plug 'slim-template/vim-slim'
Plug 'pangloss/vim-javascript'
View delegator.rb
require "delegate"
module X
def initialize(*)
__getobj__.class.instance_methods(false).each do |meth|
define_singleton_method(meth) { __getobj__.send(meth) || "Is nil"}
burningTyger / mdb2sql
Created Oct 21, 2015
use mdbtools to convert mdb to sql
View mdb2sql
# found this here:
# Create DB like this: CREATE DATABASE xyc;
# To invoke it simply call it like this:
# ./ accessfile.mdb mysqldatabasename
TABLES=$(mdb-tables -1 $1)
burningTyger / autossh.service
Last active Oct 18, 2015 — forked from thomasfr/autossh.service
Systemd service for autossh
View autossh.service
# use this if you have a systemctl --user script. Runs it as a user.
Description=Keeps a tunnel to '' open
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
burningTyger / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
These two files should help you to import passwords from mac OS X keychains to 1password.
1) You have some experience with scripting/are a power-user. These scripts worked for me
but they haven't been extensively tested and if they don't work, you're on your own!
Please read this whole document before starting this process. If any of it seems
incomprehensible/frightening/over your head please do not use these scripts. You will
probably do something Very Bad and I wouldn't want that.
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they
View bs3-login-form.html
<div class="container">
<div class="row">
<div class="col-sm-6 col-md-4 col-md-offset-4">
<h1 class="text-center login-title">Sign in to continue to Bootsnipp</h1>
<div class="account-wall">
<img class="profile-img" src=""
<form class="form-signin">
<input type="text" class="form-control" placeholder="Email" required autofocus>
<input type="password" class="form-control" placeholder="Password" required>
You can’t perform that action at this time.