Skip to content

Instantly share code, notes, and snippets.

View naterkane's full-sized avatar

Nater Kane naterkane

View GitHub Profile
<?php
/**
* Nomcat
*
* An open source microsharing platform built on CodeIgniter
*
* @package Nomcat
* @author NOM
* @copyright Copyright (c) 2009, NOM llc.
* @license http://creativecommons.org/licenses/by-sa/3.0/
<?php
/**
* Nomcat
*
* An open source microsharing platform built on CodeIgniter
*
* @package Nomcat
* @author NOM
* @copyright Copyright (c) 2009, NOM llc.
* @license http://creativecommons.org/licenses/by-sa/3.0/
(function(window,undefined){var jQuery=function(selector,context){return new jQuery.fn.init(selector,context);},_jQuery=window.jQuery,_$=window.$,document=window.document,rootjQuery,quickExpr=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/,rnotwhite=/\S/,rtrim=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,userAgent=navigator.userAgent,browserMatch,readyBound=false,readyList=[],DOMContentLoaded,toString=Object.prototype.toString,hasOwnProperty=Object.prototype.hasOwnProperty,push=Array.prototype.push,slice=Array.prototype.slice,indexOf=Array.prototype.indexOf;jQuery.fn=jQuery.prototype={init:function(selector,context){var match,elem,ret,doc;if(!selector){return this;}
if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this;}
if(typeof selector==="string"){match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){doc=(context?context.ownerDocument||context:document);ret=rsingleTag.exec(selector);if(ret){if(jQuery.isPlainObject(cont
$(function() {
// Clone HTML5's placeholder attribute functionality
$('input[placeholder]').each(function() {
// Store the placeholder text and then set the element's value
// TODO: Check to make sure value is empty before setting here
$(this).data('placeholder', $(this).attr('placeholder'));
$(this).val($(this).data('placeholder')).addClass('placeholder');
// Handle the removal/addition of the placeholder text on focus/blur
$(this).focus(function() {
function isCreditCard( cc ) {
var sum = 0, mul = 1, len = cc.length, _r = false;
if (l <= 18) {
for (n in cc) {
tproduct = n*mul;
sum += (tproduct >= 10) ? (tproduct % 10) : tproduct;
@naterkane
naterkane / MasterWidget.php
Created October 27, 2011 22:08 — forked from jonathonbyrdziak/CustomWidgetFile.php
Plugin code to create a single widget in wordpress.
<?php
/**
* @Author Jonathon byrd
* @link http://www.jonathonbyrd.com
* @Package Wordpress
* @SubPackage Widgets
* @copyright Proprietary Software, Copyright Byrd Incorporated. All Rights Reserved
* @Since 1.0.0
*
* Plugin Name: Master Widget
<script language="JavaScript" type="text/javascript">
// Comcast Cable Communications, LLC Proprietary. Copyright 2014.
// Intended use is to display browser notifications for critical and time sensitive events.
var _ComcastAlert = (function(){
return {
SYS_URL: '/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/notify.do'
, dragObj: {zIndex: 999999}
, browser: null
, comcastCheck: 1
@naterkane
naterkane / idea
Created April 6, 2016 15:09 — forked from chrisdarroch/idea
Open a project in IntelliJ IDEA from your command line!
#!/usr/bin/python
import socket
import struct
import sys
import os
import time
# see com.intellij.idea.SocketLock for the server side of this interface