Skip to content

Instantly share code, notes, and snippets.

View naterkane's full-sized avatar

Nater Kane naterkane

View GitHub Profile
@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
@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
$(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() {