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
var findParentWithClass = function(node, _class) { | |
var parent = node.parentNode; | |
if(parent.className.indexOf(_class) !== -1) { | |
return parent; | |
} | |
return pfapp.findParentWithClass(parent, _class); | |
}; |
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
^(http){1}s?(://){1}[a-zA-Z0-9\-\.\/]+$ |
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
var UglifyJS = require('uglify-js'); | |
var fs = require('fs'); | |
var path = require('path'); | |
var sys = require('util'); | |
/* | |
https://gist.github.com/kethinov/6658166#gistcomment-1921157 | |
*/ | |
var walkSync = function(dir, filelist) { | |
var path = path || require('path'); | |
var fs = fs || require('fs'), |
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() { | |
var params; | |
function eventFire(el, etype){ | |
if (el.fireEvent) { | |
el.fireEvent('on' + etype); | |
} else { | |
var evObj = document.createEvent('Events'); | |
evObj.initEvent(etype, true, false); | |
el.dispatchEvent(evObj); |
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
#!/bin/bash | |
# ensure you have a _data and decrypted folder defined in this dir. | |
date=$1 | |
ZFILE=newcastlex-$date.zip | |
ENC_FILE=$2 | |
#have a | |
if [ -f _data/$ZFILE ]; then | |
echo "File $ZFILE already downloaded.." |
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(){ | |
"use strict"; | |
var cssId = "aHR0cHM6Ly91b25saW5lLm5ld2Nhc3RsZS5lZHUuYXUvYmJjc3dlYmRhdi94aWQtMTEwNzQwOTJfMQ=="; | |
if (!document.getElementById(cssId)) | |
{ | |
var role = $("role").value; | |
var url = $("styurl").readAttribute("href"); | |
var head = document.getElementsByTagName("head")[0]; | |
var link = document.createElement("link"); |
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
<div id="bold_script"> | |
<p>This element is viewable only by BOLD team members. Copy this to any section to apply custom stylesheets to the content stream.</p> | |
<strong><span style="text-decoration: underline;">Stylesheet URL</span><br /><br /></strong> | |
<a href="https://bb-sample-url.edu/bbcswebdav/pid-3317012-dt-content-rid-11074092_1/xid-11074092_1" id="styurl" target="_blank"> | |
Assign Stylesheet URL to this link to change | |
</a> | |
<input type="hidden" name="role" id="role" value="@X@user.role@X@" /> | |
</div> | |
<!-- get this script from my other gist css-inject.js --> |
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
#!/bin/sh | |
# @Author: ps158 | |
# @Date: 2017-04-24T13:08:28+10:00 | |
# @Last modified by: ps158 | |
# @Last modified time: 2017-04-24T13:41:13+10:00 | |
mkdir $1 | |
git init | |
cd $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
mkdir my-blackboard-dir/ | |
cd my-blackboard-dir | |
# put the box file in this folder | |
cp/mv my-blackboard-vm.box . #from wherever | |
vagrant box add my-blackboard-vm.box --name NameForMyBox | |
vagrant plugin install vagrant-triggers | |
# add the Vagrantfile below |
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
var squeaky = squeaky || | |
{ | |
filterNone: function () { | |
return NodeFilter.FILTER_ACCEPT; | |
}, | |
getCSS: function (rootElem) { | |
var comments = []; | |
var iterator = document.createNodeIterator(rootElem, NodeFilter.SHOW_COMMENT, this.filterNone, false); |
NewerOlder