Skip to content

Instantly share code, notes, and snippets.

burningTyger

Block or report user

Report or block burningTyger

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
@burningTyger
burningTyger / moodle_on_do.md
Created Jun 8, 2016
How To Install Moodle via git with Postgres, Nginx and PHP on an Ubuntu 16.04 VPS
View moodle_on_do.md

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

Introduction

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.

Prerequisites

  • 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
burningTyger / testports.sh
Created Mar 7, 2016 — forked from enginefeeder101/testports.sh
Test outgoing open ports
View testports.sh
#!/bin/bash
task(){
LC_ALL=C nc -vzw5 portquiz.net $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
burningTyger / upgrade_moodle.sh
Created Jan 11, 2016
This is my upgrade script for moodle. Has worked flawlessly for the last two years.
View upgrade_moodle.sh
# 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(*)
super
__getobj__.class.instance_methods(false).each do |meth|
define_singleton_method(meth) { __getobj__.send(meth) || "Is nil"}
end
end
end
@burningTyger
burningTyger / mdb2sql
Created Oct 21, 2015
use mdbtools to convert mdb to sql
View mdb2sql
#!/bin/bash
# found this here: http://stackoverflow.com/questions/5722544/how-can-i-convert-an-mdb-access-file-to-mysql-or-plain-sql-file
#
# Create DB like this: CREATE DATABASE xyc;
# To invoke it simply call it like this:
# ./mdbconvert.sh accessfile.mdb mysqldatabasename
TABLES=$(mdb-tables -1 $1)
MUSER="root"
@burningTyger
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.
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
@burningTyger
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
View README
These two files should help you to import passwords from mac OS X keychains to 1password.
Assumptions:
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="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=120"
alt="">
<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.