Skip to content

Instantly share code, notes, and snippets.

@anzeljg
anzeljg / Moosh_bulk_course-restore.md
Last active January 5, 2023 03:21
Moosh - Bulk Backup Restore Courses

Moosh - Bulk Backup Restore Courses

by Just Another Engineer (Source)

Given a file with content as below per line which can be created based on sudo -u www-data moosh course-list | awk -F "," '{ print $1 "," $3}':

"1234","XX - XXXX/XXX/XX"
@anzeljg
anzeljg / touch.cmd
Last active July 3, 2019 07:16
implementation of 'touch' command on Windows
Windows does not natively include a touch command.
You can use any of the available public versions or you can use your own version.
Save this code as touch.cmd and place it somewhere in your path.
@echo off
setlocal enableextensions disabledelayedexpansion
(for %%a in (%*) do if exist "%%~a" (
pushd "%%~dpa" && ( copy /b "%%~nxa"+,, & popd )

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@anzeljg
anzeljg / index.php
Created March 19, 2018 22:44 — forked from anonymous/index.php
LTI Consumer test
<?php
use IMSGlobal\LTI\ToolProvider;
require_once('vendor/autoload.php');
date_default_timezone_set('UTC');
$launch_url = "http://127.0.0.1:8090/enrol/lti/tool.php?id=1";
$key = "blinc";
$secret = "8qBqXEo5U04oSUqfulPUkBKSYG3CFoSe";
$arguments = array(
@anzeljg
anzeljg / Every Word In The Periodic Table
Created March 15, 2018 07:46 — forked from jeffThompson/Every Word In The Periodic Table
Python script to generate all the possible words that can be made from the periodic table.
'''
EVERY WORD IN THE PERIODIC TABLE
Jeff Thompson | 2013 | www.jeffreythompson.org
Takes as its input the abbreviations of the elements in the
periodic table and returns all possible words that can be
generated from that input*.
Idea occurred while sitting through a boring meeting in a
lecture hall, staring at a periodic table on the wall.
@anzeljg
anzeljg / Words In The Periodic Table: Results
Created March 15, 2018 07:35 — forked from jeffThompson/Words In The Periodic Table: Results
A (partial but pretty extensive) list of words that can be made from the elements in the periodic table.
Ac
AcCePt
AcCePtS
AcCEsS
AcCEsSeS
AcCrUAl
AcCRuAl
AcCrUAlS
AcCRuAlS
AcCrUEs
@anzeljg
anzeljg / sevensegdisplay.py
Created August 12, 2017 21:05 — forked from martinohanlon/sevensegdisplay.py
4 digit 7 segment display
from gpiozero import LEDCollection, LEDBoard, OutputDeviceError, DigitalOutputDevice
from gpiozero.threads import GPIOThread
from gpiozero.exc import OutputDeviceError
from itertools import cycle
from time import sleep
class SevenSegmentDisplay(LEDBoard):
"""
Extends :class:`LEDBoard` for a 7 segment LED display
7 segment displays have either 7 or 8 pins, 7 pins for the digit display
@anzeljg
anzeljg / Verifying blockchain ID
Created February 28, 2016 15:20
Verifying that +anzeljg is my blockchain ID. https://onename.com/anzeljg
Verifying that +anzeljg is my blockchain ID. https://onename.com/anzeljg
@anzeljg
anzeljg / curl.md
Created October 16, 2012 12:11 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@anzeljg
anzeljg / HTML: basic template
Created October 15, 2012 08:57 — forked from osirismqz/HTML: basic template
HTML: basic template
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/main.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
</head>
<body>
</body>