Skip to content

Instantly share code, notes, and snippets.

/*
-------------------------------
Author: Pete Saia
File: inputHelper
Version: 2.0
http://petesaia.com/work/input-helper/
-------------------------------
*/
(function($) {
$.fn.inputHelper = function(settings) {
<?php
include(APPPATH.'libraries/facebook-client/facebook.php');
class Facebook_connect {
private $_obj;
private $_api_key = NULL;
private $_secret_key = NULL;
public $user = NULL;
<?php
$production_server = strpos($_SERVER["SERVER_NAME"], 'theProductionServer.com') !== false;
$staging_server = strpos($_SERVER["SERVER_NAME"], 'theStagingServer.com') !== false;
if ($staging_server)
{
}
elseif ($production_server)
{
<?php
// $Id$
/**
* Bill Tracker
* A drupal module for tracking bills using class.hfdrumbone.php
* @Author Pete Saia
* @version 1.0
*/
require_once drupal_get_path('module', 'bill_tracker').'/hfdrumbone.class.php';
/*
Site Name
Author
-----------------
Font Size Chart
-----------------
(Px) (%)
10 77
11 85
@psaia
psaia / .bash_profile
Last active September 24, 2015 10:27
My .vimrc file
# Path.
export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/share/python:/usr/local/Cellar/php54/5.4.3/bin/:$PATH
# Black 0;30 Dark Gray 1;30
# Blue 0;34 Light Blue 1;34
# Green 0;32 Light Green 1;32
# Cyan 0;36 Light Cyan 1;36
# Red 0;31 Light Red 1;31
# Purple 0;35 Light Purple 1;35
# Brown 0;33 Yellow 1;33
@psaia
psaia / functions.php
Created February 24, 2011 23:30
A boilerplate functions file for WordPress
<?php
/**
* -- Configuration --
*
* Here you can add your javascript files, declare custom menus,
* add widgetized areas, and add custom post types. These variables
* are then processed inside the init() hook.
*
*/
@psaia
psaia / UserLocation.php
Created June 23, 2011 17:10
Geolocation
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
-------------------------------
Author: Pete Saia
Certifikid.com
*/
class User_location
{
@psaia
psaia / functions.php
Created July 14, 2011 03:59
Sample of Rye
<?php
/**
* -- Rye Configuration --
*
* Here you can declare your javascript files, custom menus,
* widgetized areas, custom post types and taxonomies.
*
*
* Project Name: <Name>
* PHP Developer: <Your Name>
<?php
class Bitly {
private $login;
private $appkey;
function __construct($login, $appkey)
{
$this->login = $login;
$this->appkey = $appkey;
}
function shorten($url)