Skip to content

Instantly share code, notes, and snippets.

@pherrymason
pherrymason / client_secret.json
Created June 17, 2014 17:52
youtube v3 change banner channel example not working
// Place your google client_secret.json file here
@pherrymason
pherrymason / unbind.hoverIntent.js
Created April 11, 2014 11:06
Unbind jQuery HoverIntent
var rawIntent = $.fn.hoverIntent;
$.fn.hoverIntent = function(handlerIn, handlerOut, selector){
var args = arguments;
return this.each(function(){
// If called with empty parameter list, disable hoverIntent
if( typeof handlerIn==='undefined' )
{
// Destroy the time if it is present
if( typeof(this.hoverIntent_t!=='undefined') )
@pherrymason
pherrymason / Create sections.html
Created March 7, 2014 09:15
Crear secciones en plantillas de Mailchimp
<!-- // Begin Module: Standard Content \\ -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top">
<div mc:edit="std_content00">
<h2>New Solutions &amp; Updates</h2>
We hope you're having fun in the sun this summer! The Generitech team is excited to announce several powerful new solutions and a few updates to existing products, all available in June! Thanks to our loyal newsletter subscribers for experiencing the difference, month after month.
</div>
</td>
</tr>
@pherrymason
pherrymason / tarjetas de prueba.md
Last active January 19, 2024 22:24
Tarjetas de prueba. NO SIRVEN para realizar pagos reales. Sólo los desarrolladores sabrán para que sirven.

##4B (Banco pastor, Banco popular, Banco Santander Cental Hispano…):

  • Nº Tarjeta: 40000 Cualquier fecha de caducidad futura y cvv2: 111
  • Nº Tarjeta: 12345 Cualquier fecha de caducidad futura y cvv2: 111

##CECA (BBK, Kutxa,CajaSur, Caja Granada, Caja de guadalajara…):

  • 5540500001000004 Caducidad: AAAA12 (Diciembre del año en curso) CVV2: 989
  • 5020470001370055 Caducidad: AAAA12 (Diciembre del año en curso) CVV2: 989
  • 5020080001000006 Caducidad: AAAA12 (Diciembre del año en curso) CVV2: 989
@pherrymason
pherrymason / phpdoc.php
Created February 6, 2014 12:31
PHP DOC tags
/**
* The short description
*
* As many lines of extendend description as you want {@link element} links to an element
* {@link http://www.example.com Example hyperlink inline link} links to a website
* Below this goes the tags to further describe element you are documenting
*
* @param type $varname description
* @return type description
* @access public or private
@pherrymason
pherrymason / remove git submodule.md
Created January 14, 2014 16:13
Fully remove Git Submodule
@pherrymason
pherrymason / snowflakes.js
Created December 25, 2013 09:37
Snowflakes with javascript & canvas
(function () {
var COUNT = 300;
var masthead = document.querySelector('.masthead');
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
var width = masthead.clientWidth;
var height = masthead.clientHeight;
var i = 0;
var active = false;
(function($,sr){
// debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
var debounce = function (func, threshold, execAsap) {
var timeout;
return function debounced () {
var obj = this, args = arguments;
function delayed () {
if (!execAsap)
func.apply(obj, args);
@pherrymason
pherrymason / .git.txt
Created December 15, 2013 16:58
Git config
[core]
filemode = false # Ignore file mode
@pherrymason
pherrymason / select text in a node.js
Created December 15, 2013 09:33
Select text in a node.
function SelectText(element) {
var doc = document;
var text = doc.getElementById(element);
if (doc.body.createTextRange) {
var range = document.body.createTextRange();
range.moveToElementText(text);
range.select();
} else if (window.getSelection) {
var selection = window.getSelection();
var range = document.createRange();