Skip to content

Instantly share code, notes, and snippets.

View sijpkes's full-sized avatar

Paul Sijpkes sijpkes

  • University of Newcastle
  • Newcastle, NSW, Australia
View GitHub Profile
@sijpkes
sijpkes / COMP3850 - BOLD Project Proposal.md
Last active June 15, 2016 02:15
COMP3850 - BOLD Computer Science WiL Project Proposal
Blended and On-line Learning Team (BOLD), UoN

15/06/16

Student Centred, Personalised Visualisation of Learning Analytics

Background

Learner feedback is crucial to successfully closing the learning analytics cycle. The learning analytics cycle involves learners that produce data, instructors then apply metrics to this data and respond with classroom or course based interventions (Clow, 2012). The aim of this project is to help dispense with intervention and allow the student to make an informed decision on what aspects of their learning they need to work on, in relation to their peer group. To allow students to understand their progress in relation to their peers it is useful to have a visual feedback mechanism that allows them to see themselves in context of their course cohort through visualisation of their progress. This will be achieved by producing a data-driven document (D3) that implements the D3.js javascript library. The successful applicant will be supplied wit

@sijpkes
sijpkes / gist:1f6198cb8dcfb4b5e9eb87afab2b8bda
Last active July 26, 2016 05:03
Vagrant setup for lti_link_generator
@sijpkes
sijpkes / gradebook_deidentify.rb
Last active August 11, 2016 03:09
De identifies Blackboard gradebook JSON output (requires stympy/faker)
require 'json'
require 'faker'
contents = File.read('raw_gradebook.json')
data = JSON.parse(contents)
uid = 9990000
data['cachedBook']['rows'].map! { |row|
fullname = Faker::Name.name
namea = fullname.split(' ')
'.text.html.basic':
'HTML 5 + Slim JQuery 3.0':
'prefix' : 'jqslim'
'body' : "<!DOCTYPE html>\n
<html>\n\t
<head>\n\t\t
<meta charset=\"utf-8\">\n\t\t\t
<title>$1</title>\n\t\t
</head>\n\t
<body>\n\t
@sijpkes
sijpkes / clickjack_prev.php
Last active August 26, 2016 02:45
PHP clickjack prevention
private static function clickjack_prevention($allowed_host) {
$deny_iframe = isset($_SERVER['HTTP_REFERER']);
if($deny_iframe) {
$referer = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST);
$deny_iframe = $allowed_host == $referer;
}
if($deny_iframe) {
static::deny_xframe_header();
==> default: Detecting network information for machine...
default: Local machine address: 127.0.0.1
default:
default: Note: With the local address (127.0.0.1), Vagrant Share can only
default: share any ports you have forwarded. Assign an IP or address to your
default: machine to expose all TCP ports. Consult the documentation
default: for your provider ('virtualbox') for more information.
default:
/opt/vagrant/embedded/lib/ruby/2.2.0/net/http.rb:923:in `connect': SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A (OpenSSL::SSL::SSLError)
from /opt/vagrant/embedded/lib/ruby/2.2.0/net/http.rb:923:in `block in connect'
@sijpkes
sijpkes / check_column_exists.php
Created November 9, 2016 04:44
expressionengine check column exists - ANSI safe
function checkColumnExists($table_name, $column_name) {
$db = ee()->config->item('database');
$database_name = $db['expressionengine']['database'];
$table_name = ee()->db->dbprefix($table_name);
$sql = "SELECT *
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = '$database_name'
AND TABLE_NAME = '$table_name'
RequestHeader set X-Forwarded-Proto "https"
WSGIScriptAlias /dalite-ng .../dalite-ng/dalite/wsgi.py
WSGIPythonPath .../dalite-ng
WSGISocketPrefix run/wsgi
Alias /dalite-ng/static .../dalite-ng/static
ServerName your.server.edu.au
<Directory /.../dalite-ng/static> # replace with real path
#!/bin/sh
VERSION_BASE=$2
BUILD_PATH=~/workspace/rhel_6.8_VM/lti/build
LOCAL_PATH=~/workspace/rhel_6.8_VM/lti
REMOTE_PATH=/your-ee-install/system/user/addons
EE_ADDON=$1
STAMP=$(date +%s)
mkdir $BUILD_PATH
@sijpkes
sijpkes / EE Add-on Builder and Deployer
Last active March 9, 2017 04:39
deploys add-on to server and bumps version, then commits and tags
#!/bin/sh
USER=$3
BUILD_PATH=~/.../lti/build
LOCAL_PATH=~/.../lti
REMOTE_PATH=.../user/addons
EE_ADDON=$1
TARGET=$2 # dev or prod
TAG=$4
BUMP=$5
#dev