Skip to content

Instantly share code, notes, and snippets.

View prigazzi's full-sized avatar

Pablo Rigazzi prigazzi

View GitHub Profile
@prigazzi
prigazzi / README.md
Last active May 9, 2023 19:23 — forked from danburzo/README.md
Scrape your Facebook saved links

Facebook does not provide an easy way to get your saved links out of its system. Here's a quick script that does that for you.

Instructions

Go to your Saved links page and make sure you scroll way down to the bottom so that all your saved items are loaded. This script will generate a simple HTML page with your links, along with an Add to Pinboard action.

Bookmarklet

Drag this to your bookmarks toolbar:

<?php
class Injectable
{
public function tomalaToda($argument)
{
return "Comete ". $argument;
}
}
class Golosa
@prigazzi
prigazzi / snake.html
Created July 1, 2016 15:44
HTML Snake Game
<!documentTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Play Snake Game</title>
<style type="text/css">
body {text-align:center;}
canvas { border:5px dotted #ccc; }
h1 { font-size:50px; text-align: center; margin: 0; padding-bottom: 25px;}
</style>
@prigazzi
prigazzi / Builder.php
Created September 3, 2015 08:03
A Simple Deferred Object implementation.
<?php
class Builder
{
public $objects = [];
public $factory = [];
public function factory($name, $callable)
{
$this->factory[$name] = $callable->bindTo($this);
}
@prigazzi
prigazzi / gist:8455010
Created January 16, 2014 13:31
Recibir en el constructor un array de parámetros indefinidos y procesarlos con un simple método.
<?php
class User {
private $_db = null;
private $_log = null;
private $_params = array();
public function __construct(array $params) {
$this->setParams($params);
}
@prigazzi
prigazzi / gist:8454758
Created January 16, 2014 13:10
Pequeño ejemplo de Lazy Loading en una clase en PHP
<?php
class User {
private $_db = null;
public function setDB(DBClass $db) {
return $this->_db = $db;
}
public function getDB() {
if(null == $this->_db) {
@prigazzi
prigazzi / gist:2646543
Created May 9, 2012 16:46
Javascript: Plugin base para jQuery
;(function( $, window, document, undefined) {
var pluginName = 'ejemplo',
defaults = {
autoExec : true,
autoExecMethod : 'auto',
default : 'values',
}
// Código de inicialización acá
methods = {