Skip to content

Instantly share code, notes, and snippets.

View sitesbyjoe's full-sized avatar
😎
Designing and developing always

Joseph R. B. Taylor sitesbyjoe

😎
Designing and developing always
View GitHub Profile
@sitesbyjoe
sitesbyjoe / sparkles.js
Created June 3, 2016 16:26
Applying a sparkley effect to an element - but for a few moments as an attention getting
// sparkles!!!!
/* using in another script completion.js
$(".sparkley").sparkleh({
count: 100,
overlap: 6
});
$('.points.sparkley').trigger('begin');
snd.play();
setTimeout(function() {
@sitesbyjoe
sitesbyjoe / completion.js
Created June 3, 2016 16:23
Tracking the completion of an Activity on SP by monitoring the server for a $_SESSION update from JS...
// see if the original sp object is out there...
var sp = sp || {};
// tacking the new object to the existing sp object
sp.completionTracking = {
trackingAllowed: true,
cookies: {
// make a cookie
@sitesbyjoe
sitesbyjoe / tou-banner.js
Created June 3, 2016 16:17
Terms of Use Banner Display for 30 Days
/**
* TOU Banner Display Code
* -------------------------------------------------------
* Note: this code DOES REQUIRE jQuery - but any version is fine
* as I'm doing very basic DOM manipulation with it.
*
* @author Joseph R. B. Taylor - jtaylor@edvisors.com
* @date 2013-07-10
*/
@sitesbyjoe
sitesbyjoe / mixins.less
Created June 3, 2016 16:15
Some LESS mixins
/* mixins.less */
.round(@radius: 4px) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
-ms-border-radius: @radius;
-o-border-radius: @radius;
border-radius: @radius;
}
@sitesbyjoe
sitesbyjoe / jajo.js
Created June 3, 2016 16:14
jajo.js - home-brewed screen recording from back in 2013...
/* -----------------------------------------------------------
* Super user tracking script - jajo pronounced (ha-ho)
* -----------------------------------------------------------
* A generic script to track what a user does on a webpage,
* storing it and having the ability to replay each session.
* -----------------------------------------------------------
*
* User Tracking:
* - Capturing the scrolling, mouse movements and clicks of a
* - desktop user.
@sitesbyjoe
sitesbyjoe / activity-grid.js
Created June 3, 2016 16:13
Basic Angular 1.x Application Template
var activityGrid = angular.module('activityGrid', []);
activityGrid.factory('activityFactory', function($http) {
var factory = {};
factory.getActivities = function(search, offset, limit) {
return $http.get('https://www.scholarshippoints.com/admin/activities/getActivities/?search=' + search + '&offset=' + offset + '&limit=' + limit).then(function(result) {
return result;
});
};
@sitesbyjoe
sitesbyjoe / Gruntfile.js
Created June 3, 2016 16:11
My Gruntfile,js setup at Edvisors
module.exports = function(grunt) {
require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
//secret: grunt.file.readJSON('secret.json'),
jshint: {
@sitesbyjoe
sitesbyjoe / tail all logs
Created September 3, 2013 15:40
tailing all the logs on my servers at work.
find {/var/log/httpd/{removed}_sites/current/,/var/log/{removed}/} -type f | xargs tail -f
@sitesbyjoe
sitesbyjoe / ci-template.php
Created March 19, 2013 15:02
Codeigniter Empty File Template
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/* End of File: ci-template.php */
/* Location: ./application/...ci-template.php */
@sitesbyjoe
sitesbyjoe / mq.css
Created October 3, 2012 19:11 — forked from chriscoyier/mq.css
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),