Skip to content

Instantly share code, notes, and snippets.

View mrpollo's full-sized avatar
Journey before destination

Ramon Roche mrpollo

Journey before destination
  • Tijuana, Baja California, Mexico
  • 21:23 (UTC -07:00)
  • X @mrpollo
View GitHub Profile
identify -format "%f %[fx:w/72] by %[fx:h/72] inches \n" `find . -iname *\.pdf`
@mrpollo
mrpollo / screenutil.js Example
Created April 20, 2011 21:19
Example usage of screenutil.js
(function(d, c){
d.style.left = c.x - ( d.style.width / 2 );
d.style.top = c.y - ( d.style.height / 2 );
}( document.getElementById('test'), screenutil.getScreenCenter() ));
@mrpollo
mrpollo / Geocoding API
Created April 20, 2011 21:48
Example usage of the Geocoding API
<?php
include "yahoo.php";
$yt = new ygeo();
echo json_encode( $yt->lookPostal('90210') );
Result:
{
"ResultSet": {
"version": "1.0",
"Error": 0,
"ErrorMessage": "No error",
@mrpollo
mrpollo / gist:943612
Created April 27, 2011 02:19
How To install PV:
#If you’re on Debian or Debian based system such as Ubuntu do the following:
sudo aptitude install pv
#If you’re on Fedora or Fedora based system such as CentOS do:
sudo yum install pv
#If you’re on Slackware, go to pv homepage, download the pv-version.tar.gz archive and do:
@mrpollo
mrpollo / .vimrc
Created May 4, 2011 17:21
My vim config
set nocompatible
set number
set ruler
syntax on
" Set encoding
set encoding=utf-8
" Whitespace stuff
@mrpollo
mrpollo / use of this
Created June 22, 2011 23:27
Javascript use of this in OOP
function foo(){
this.test = "hello scope";
setTimeout( function(self){ self.bar(self); }, 1000, this );
}
foo.prototype.bar = function(self){
console.log( self.test );
}
var x = new foo();
@mrpollo
mrpollo / wrong use of this
Created June 22, 2011 23:30
Javascript wrong use of this in OOP
// Main Class Foo
function foo(){
// Foo has some properties we need to access later
this.test = "hello scope";
// We call a member function on a timer
setTimeout( this.bar, 1000 );
}
foo.prototype.bar = function(){
// once the timer is called it executes this function
// but as a result of using the timer we have lost our referenced parent
Firmar contrato de Agente Distribuidor
Entregar Documentación:
Acta Constitutiva (Persona Moral)
Poder Notarial                 (Persona Moral)
RFC                                    (Persona Física/Moral)
ID Oficial con fotografía (Persona Física/Moral)
Comprobante de Domicilio        (Persona Física/Moral)
Referencia Bancaria (Persona Física/Moral)
Entregar una factura con todos los requisitos fiscales a nombre de GSAT Comunicaciones S.A. de C.V. para pago de comisiones.
@mrpollo
mrpollo / ok go bypass
Created July 27, 2011 17:20
OK Go Video Firefox bypass
isChrome = true;
ImportJS('/static/js/Delegate.js');
ImportJS('/static/js/EventDispatcher.js');
ImportJS('/static/js/API.js');
ImportJS('/static/js/ReflectAPI.js');
ImportJS('/static/js/Timeline.js');
ImportJS('/static/js/AudioList.js');
ImportJS('/static/js/VideoList.js');
ImportJS('/static/js/MultiWindow.js');
ImportJS('/static/js/MessageForm.js');
@mrpollo
mrpollo / ffmpeg iPad conversion
Created July 29, 2011 07:40
Just a quick note on how to convert video to and iPad appropiate format
ffmpeg -i INPUT -acodec libfaac -ac 2 -ab 160k -s 1024x768 -vcodec libx264 -vpre slow -vpre iPod640 -b 1200k -f mp4 -threads 0 OUTPUT