Skip to content

Instantly share code, notes, and snippets.

View hparadiz's full-sized avatar
💻
Coding

Henry Paradiz hparadiz

💻
Coding
View GitHub Profile
var newsSlider = {
init: function(containerSelector, slidesSelector) {
if($(containerSelector))
{
if(slides = $(slidesSelector))
{
this.slideCount = $(slidesSelector).length;
$.each(slides,function(index,value) {
if($(value).css('display') == 'block')
{
@hparadiz
hparadiz / gist:6705392
Last active December 23, 2015 22:49
Youtube sync script for youtube videos and playlists
<?php
namespace YouTube;
class Video extends \EmergenceModel
{
// support subclassing
static public $rootClass = __CLASS__;
static public $defaultClass = __CLASS__;
static public $subClasses = array(__CLASS__);
@hparadiz
hparadiz / RemoteEmergenceMedia.class.php
Created April 3, 2013 20:28
EmergenceMedia wrapper for a remote Emergence Media Store
<?php
class RemoteEmergenceMedia extends EmergenceMedia
{
static public $remoteStore = 'http://173.45.225.61/auth/media/json';
static public $remoteKey = 'k1f6eZoIXNc6vJwrhDJaEWr4N';
@hparadiz
hparadiz / RemoteActiveRecord.class.php
Created October 12, 2012 13:39
ActiveRecord for Remote RecordsRequestHandler wrapper ActiveRecord stores
<?php
class RemoteActiveRecord extends ActiveRecord
{
static public $remoteStore;
static public $remoteKey;
static public function getRecordByField($field, $value, $cacheIndex = false)
{
$filter = array(array(
@hparadiz
hparadiz / Custom.css
Created October 5, 2012 16:11
Custom style for Chrome Inspector Tool
/**********************************************/
/*
/* Coda Classic Dark by Henry Paradiz - 2012
/*
/* For how to install, or more themes, check out:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
/* Color scheme is based on Panic's Coda Inverted Dark:
/*
/**********************************************/
@hparadiz
hparadiz / Devise.sha1.php
Created September 24, 2012 14:42
PHP Version of devise/lib/devise/encryptors/restful_authentication_sha1.rb for Older Versions of Devise
define('_DIGEST_PEPPER','PEPPER HERE');
function digest($password, $stretches, $salt, $pepper)
{
$digest = $pepper;
$x = 0;
while($x != $stretches)
{
$data = array($digest,$salt,$password,$pepper);
@hparadiz
hparadiz / FormSerializer.js
Created August 29, 2012 16:01
Ext.FormSerializer
/* @Author Henry Paradiz [email protected]
*
* Ext.FormSerializer
*
* Converts HTML form element values to JavaScript Object,
* JSON, and HTTP GET compatible query string.
*
* Usage:
*
* new Ext.FormSerializer('formID').toObject();
<?php
/**
* Pretty Errors
*
* ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
*
* WARNING! It is downright _DANGEROUS_ to use this in production, on
* a live website. It should *ONLY* be used for development.
*
* Pretty Errors allows the outside world to alter your project,
@hparadiz
hparadiz / SWFUpload.js
Created October 6, 2011 20:20
SWFUpload adapter class for Extjs 4
/*
* SWFUpload adapter for Ext
* Author: Chris Alfano ([email protected]) - Sep 06,2009
* Author: Henry Paradiz ([email protected]) - June 17, 2011 - Upgraded to Ext 4
*
* See SWFUpload documentation: http://demo.swfupload.org/Documentation/#settingsobject
*/
// REQUIRES THIS EXTERNAL FILE: //name: 'SWFUpload'
//,URL: '/jslib/SWFUpload/swfupload.js' // need to figure out how to dynamically load this with Extjs4