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 /
Last active Aug 9, 2020
Install Arch
# This guide is based on
# compare for more details on each step. It's a great guide and seems to get frequent updates.
# This guide has a few changes that helped me to get thew bootloader running
# Start up the Live USB/CD and enable SSH:
# set a password for root to enable ssh login
# *
systemctl start sshd.service
burningTyger /
Created Aug 4, 2019
sqlite with icu support
# in order to have icu support in sqlite you need to enable it via compile options.
# install the icu dev package on your system and download the source files from sqlite
# unpack and enter the source dir
# on a mac I had to do this to compile:
brew install icu4c
CFLAGS=`-I/usr/local/opt/icu4c/include -O3 -DSQLITE_ENABLE_ICU` CPPFLAGS=`icu-config --cppflags` LDFLAGS=`-L/usr/local/opt/icu4c/lib icu-config --ldflags` ./configure
# I had to add the path to the icu libs
View App.svelte
<h1>{ || 'No selection'}</h1>
<div class="search">
<input bind:value={term} on:keydown={keydown} class="input" on:blur={() => options = []}>
<ul class="list">
{#each options as t,i}
class={`item ${i+1 === pos ? 'active':''}`}
on:click={() => select(t)}
burningTyger / 29-prettify.conf
Created Dec 6, 2014
Arch better looking fonts for Chrome
View 29-prettify.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<match target='font' >
<edit mode='assign' name='rgba' >
<match target='font' >
<edit mode='assign' name='hinting' >
burningTyger /
Created Feb 20, 2018 — forked from chrislkeller/
Displaying data from a flat JSON file on a Handlebars.js template file rendered with AJAX.

Demo: ajax-handlebars

This repo's location has changed.

View basemodel.js
class BaseModel extends Model {
static get allRelations() {
return '[' + Object.keys(this.relationMappings).join(',') + ']';
//And then inherit your models from that instead of Model.
class Person extends BaseModel {
burningTyger /
Last active Aug 30, 2017
How to deploy your openshift app to a second instance

##How to deploy your openshift app to a second instance

I set up Moodle for myself on Openshift which I explained here:

Now I wanted to install Moodle for a friend who has his own user and his own domain on openshift. Since I'm the admin why bother creating a second app which is basically the exact same app as mine and will most cetainly need the exact same updates. DRY!

So I decided to find out how I can use the app repo on two different instances of openshift. This is how it works (there might be better solutions, let me know):

You log in as the second user and create a new app. This will give you a git URL. Copy this URL and head over to you app repo (Moodle used in this example):

burningTyger / authentication.rb
Created Dec 7, 2011 — forked from jnunemaker/authentication.rb
a starting point for authentication with mongomapper and rails
View authentication.rb
# include this in application controller
module Authentication
# Inclusion hook to make #current_user and #signed_in?
# available as ActionView helper methods.
def self.included(base)
base.send :helper_method, :current_user, :signed_in?, :authorized? if base.respond_to? :helper_method
# Returns true or false if the user is signed in.
You can’t perform that action at this time.