This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
$(window).scroll(function() { | |
$('article').each( function(i){ | |
var bottom_of_object = $(this).position().top; | |
var bottom_of_window = $(window).scrollTop() + $(window).height(); | |
if( $(window).scrollTop() < 2000 ) { | |
$('.lax').css('top', ($(window).scrollTop() * 0.25 )+'px').removeClass('active').addClass('show'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
window.colourer = function( sel ) { | |
var colors = [{"hex":"#EFDECD","name":"Almond","rgb":"(239, 222, 205)"},{"hex":"#CD9575","name":"Antique Brass","rgb":"(205, 149, 117)"},{"hex":"#FDD9B5","name":"Apricot","rgb":"(253, 217, 181)"},{"hex":"#78DBE2","name":"Aquamarine","rgb":"(120, 219, 226)"},{"hex":"#87A96B","name":"Asparagus","rgb":"(135, 169, 107)"},{"hex":"#FFA474","name":"Atomic Tangerine","rgb":"(255, 164, 116)"},{"hex":"#FAE7B5","name":"Banana Mania","rgb":"(250, 231, 181)"},{"hex":"#9F8170","name":"Beaver","rgb":"(159, 129, 112)"},{"hex":"#FD7C6E","name":"Bittersweet","rgb":"(253, 124, 110)"},{"hex":"#000000","name":"Black","rgb":"(0,0,0)"},{"hex":"#ACE5EE","name":"Blizzard Blue","rgb":"(172, 229, 238)"},{"hex":"#1F75FE","name":"Blue","rgb":"(31, 117, 254)"},{"hex":"#A2A2D0","name":"Blue Bell","rgb":"(162, 162, 208)"},{"hex":"#6699CC","name":"Blue Gray","rgb":"(102, 153, 204)"},{"hex":"#0D98BA","name":"Blue Green","rgb":"(13, 152, 186)"},{"hex":"#7366BD","name":"Blue Violet","rgb":"(1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jquerify.js | |
// https://github.com/bgrins/devtools-snippets | |
// Add jQuery to any page that does not have it already. | |
(function () { | |
if ( !window.jQuery ) { | |
var s = document.createElement('script'); | |
s.setAttribute('src', '//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js'); | |
document.body.appendChild(s); | |
} | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Drop the function if it's already there | |
drop function if exists LOCATE_OFFSET; | |
# Define the function | |
# @param substr The substring to search for | |
# @param str The string to search through | |
# @param offset The nth-occurrence being looked for (1-indexed, using 0 will always return 0) | |
DELIMITER // | |
CREATE FUNCTION LOCATE_OFFSET(substr text, str text, offset int) | |
RETURNS int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop function if exists LOCATE_OFFSET; | |
DELIMITER // | |
CREATE FUNCTION LOCATE_OFFSET(substr text, str text, offset int) | |
RETURNS int | |
DETERMINISTIC | |
BEGIN | |
DECLARE loc INT DEFAULT 1; | |
DECLARE i INT DEFAULT 0; | |
WHILE(i<offset) DO | |
SET loc=LOCATE(substr, str, loc+1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## President | |
- Michael Kutner: https://www.eusa.ed.ac.uk/elections/manifesto/850/ | |
- Faatima Osman: https://www.eusa.ed.ac.uk/elections/manifesto/937/ | |
- Theo Robertson-Bonds: https://www.eusa.ed.ac.uk/elections/manifesto/797/ | |
- Jonny Ross-Tatam: https://www.eusa.ed.ac.uk/elections/manifesto/822/ | |
## Vice President - Academic Affairs | |
- Chris Edrev: https://www.eusa.ed.ac.uk/elections/manifesto/968/ | |
- Thomas Kerr: https://www.eusa.ed.ac.uk/elections/manifesto/927/ | |
- Calum Mackie: https://www.eusa.ed.ac.uk/elections/manifesto/851/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** OLD ***/ | |
(function($){ | |
"use strict"; | |
// Define namespace | |
uoe.namespace_for_this_mod = {}; | |
// Define a function | |
function exampleFunctionIveCreated() { | |
alert( 'Please remove the exampleFunctionIveCreated function from your module.' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function EventManager() { | |
const events = {}; | |
function emit(event) { | |
if (typeof events[event] === 'undefined') return false; | |
for (let i = 0, l = events[event].length; i < l; i++) { | |
events[event][i].apply(this, Array.prototype.slice.call(arguments, 1)); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Basic usage of types, records and pipelining | |
*/ | |
CREATE OR REPLACE PACKAGE gt_test AS | |
TYPE gt_mav IS RECORD(code varchar2(9), year varchar2(7)); | |
TYPE gt_table IS TABLE of gt_mav; | |
FUNCTION tab_test(i_mod_code VARCHAR) RETURN gt_table PIPELINED; | |
END; | |
/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x-amazon-apigateway-integration: | |
type: "mock" | |
responses: | |
default: | |
statusCode: "200" | |
responseTemplates: | |
application/json: "{\"ok\":true}" |