Skip to content

Instantly share code, notes, and snippets.

View zedd45's full-sized avatar
😁
I may be slow to respond.

Chris Keen zedd45

😁
I may be slow to respond.
View GitHub Profile
@zedd45
zedd45 / jquery.plugin.js
Created April 15, 2013 21:26
jQuery plugin boilerplate
// make sure our browser supports creating new objects:
if ( typeof Object.create !== 'function' ) {
Object.create = function (o) {
function F(){}
F.prototype = o;
return new F();
};
}
/**
@zedd45
zedd45 / console.log.js
Last active December 16, 2015 06:29
intelligent log mechinism
/**
* inform the developers that there has been a problem by printing a message to the console
* @param consoleMessage [string] - a (developer friendly) description of the error
* @param errorObject [ Error object literal] - the Error object, usually generated by an exception
* @param consoleMethod [string] (optional) - the type of console message to use (eg - error, log, warn ). Defaults to 'log'
*/
logMessage: function ( consoleMessage, errorObject, consoleMethod) {
// var IEMessage = errorObject && errorObject.description ? errorObject.description : 'No additonal details available';
if ( "object" !== typeof console ) { return -1; }
@zedd45
zedd45 / engadget.html
Created November 14, 2014 21:03
Frontend Masters: Jonathan Snook / SMACSS Engadget Menu Exercise
<!DOCTYPE html>
<html>
<head>
<title>Snook Engadget Menu Exercise</title>
<!-- <link rel="stylesheet" href="smacss-endgaget.css"/> -->
<style type="text/css">
/*
we should separate out the modules into different classnames.
they shouldn't intermingle;
*/
@zedd45
zedd45 / registration.spec.coffee
Last active August 29, 2015 14:09
registration / login tests
describe "User Registration", ->
describe "Login", ->
beforeEach ->
# Mock the Facebook login (try not to hurt it's feelings; FB is nice)
window.FB = jasmine.createSpyObj "FB", ["login"]
jasmine.Ajax.install()
this.registrationDialog = Vu.Registration.logIn()
@zedd45
zedd45 / navigation-top.php
Last active August 29, 2015 14:13
jKreative Login
<?php
global $woocommerce;
$navobj = jeg_get_navigation_setup();
?>
<div class="navigation-flag"></div>
<div class="topnavigation">
<?php if($navobj['navtoptwoline']) { ?>
<div class="twolinetop">
@zedd45
zedd45 / index.php
Last active August 29, 2015 14:13
Disable recover password email in Profile Builder for Wordpress
<?php
/**
* Plugin Name: Profile Builder Recover Password - No Confirmation Email
* Plugin URI: http://webbridgestudios.com/
* Description: Sending a password in plain text is a security risk. Disable the email that PB sends when a user preforms "recover password" action.
* Version: 0.1.3
* Author: Chris Keen
* Author URI: http://github.com/zedd45
* License: Dual License: GPL2 / MIT
*/
@zedd45
zedd45 / includecustomloginlinks.php
Created January 20, 2015 20:17
Wordpress Login LInks for header navigation
@zedd45
zedd45 / Angular-U-Doug-Crockford.md
Last active August 29, 2015 14:23
Doug's Talk on what comes after HTML

Talk 9: Douglas Crockford: Security

History

  • with diskdrives, we have programs sharing the same spaces, so passwords appear
  • shared time on a processor is next
    • prevents access to other users
    • ensures the CPU time is "paid for"
  • As the web grows, humans cannot remember their passwords
@zedd45
zedd45 / rec-nock.js
Last active September 10, 2015 20:08
Nock Record - Thanks @dbretoi
/**
* For use with Nocking Hapi Requests (with Lab)
* Nock: https://github.com/pgte/nock/
* Hapi: http://hapijs.com/api
* Lab: https://github.com/hapijs/lab
*/
// npm deps
var Nock = require('nock');
'use strict';
class Animal {
constructor () {
}
eat (food) {