Skip to content

Instantly share code, notes, and snippets.

View tonycaputome's full-sized avatar
🏠
Working from home

Antonio Caputo tonycaputome

🏠
Working from home
  • Frontend Engineer
  • Milan, Italy
View GitHub Profile
@StevenBlack
StevenBlack / jquery.pluginOutline.js
Created April 6, 2010 22:41
Skeleton jQuery plugin
// Skeleton jQuery plugin
function($)
{
$.fn.myPlugin = function( options )
{
// options.
$.fn.myPlugin.settings = $.extend( {}, $.fn.myPlugin.defaults, options );
// Go through the matched elements and return the jQuery object.
@SeanHayes
SeanHayes / signRequest.pseudo_code
Created July 3, 2010 01:21
Pseudo code for signing OAuth requests
function urlEncode(str){
//everything except [a-zA-Z0-9-_~.] must be percent encoded: http://tools.ietf.org/html/rfc5849#section-3.6
}
function hmac_sha1(key, text){
//you'll definitely want a library for this. I used Crypto-JS: http://code.google.com/p/crypto-js/
}
function base64me(key, text){
//I used Crypto-JS for this too.
}
/*
@cowboy
cowboy / HEY-YOU.md
Last active July 1, 2024 08:37
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
@balupton
balupton / README.md
Last active July 13, 2024 17:32
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo
@addyosmani
addyosmani / jQueryPluginPatterns.js
Created August 31, 2011 18:02
jQuery Plugin Patterns
/*
A (very) WIP collection of optimized/recommended jQuery plugin patterns
from @addyosmani, @cowboy, @ajpiano and others.
Disclaimer:
-----------------------
Whilst the end-goal of this gist is to provide a list of recommended patterns, this
is still very much a work-in-progress. I am not advocating the use of anything here
until we've had sufficient time to tweak and weed out what the most useful patterns
@revathskumar
revathskumar / migrate.php
Created March 7, 2012 05:49
Codeigniter migration
<?php defined("BASEPATH") or exit("No direct script access allowed");
class Migrate extends CI_Controller{
public function index($version){
if(ENVIRONMENT != 'development'){
show_404("migrate");
exit;
}
$this->load->library("migration");
@markbrown4
markbrown4 / pushStateOrNothing.js
Created March 24, 2012 07:58
pushState partial page updates
$('body').on('click', '.partial', function() {
if (Modernizr.history) {
$('#content').load(this.href, function() {
history.pushState(null, this.title, this.href);
});
return false;
}
}
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@fenneh
fenneh / SubSyncgDrive.bat
Created June 6, 2012 21:04
Syncing Sublime Text 2 Settings with Google Drive
Rem Just an example of how to sync your Sublime Text 2 settings with googledrive. Only works on Windows Vista+
Rem Uses mklink to create links to your google drive http://technet.microsoft.com/en-us/library/cc753194(v=ws.10).aspx
Rem http://www.justfen.com/post/24560405011/syncing-sublime-text-2-with-google-drive
cd %APPDATA%\Sublime Text 2\
mklink /d "Backup" "C:\Users\fen\Google Drive\Sublime\Backup"
mklink /d "Installed Packages" "C:\Users\fen\Google Drive\Sublime\Installed Packages"
mklink /d "Packages" "C:\Users\fen\Google Drive\Sublime\Packages"
mklink /d "Pristine Packages" "C:\Users\fen\Google Drive\Sublime\Pristine Packages"
mklink /d "Settings" "C:\Users\fen\Google Drive\Sublime\Settings\"
@cosenary
cosenary / README.markdown
Last active June 21, 2020 16:56
Instagram PHP API - How to implement a load more button (AJAX)

Instagram PHP API

How to use

index.php file

Enter your Instagram client id and display the first results.
Then store the next_max_id which you receive if you call:

$media->pagination->next_max_id;