Skip to content

Instantly share code, notes, and snippets.

View gasi's full-sized avatar

Daniel Gasienica gasi

View GitHub Profile
// cURL: http://php.net/manual/en/book.curl.php
// cURL Options: http://www.php.net/manual/en/function.curl-setopt.php
// @param $url URL of the request, e.g. https://www.sandbox.paypal.com/cgi-bin/webscr
// @param $data URL encoded request data as array, e.g. $data = array('cmd' => '_notify-validate');
function urlopen($url, $data)
{
$curl_handler = curl_init();
$options = array(CURLOPT_URL => $url,
CURLOPT_FAILONERROR => true,
CURLOPT_RETURNTRANSFER => true,
@gasi
gasi / itunes-tagger.py
Created October 17, 2010 18:52
Add IMDb metadata to mp4 files.
We couldn’t find that file to show.
@gasi
gasi / README.md
Created April 5, 2011 04:03
Node & npm Installation Instructions

Node

Installation

git clone https://github.com/joyent/node.git
cd node/
git checkout v0.4.5 # or any other version you'd like
./configure --debug
make install
@gasi
gasi / titleCaps.js
Created May 4, 2011 06:16
Title Caps (JavaScript)
/*
* Title Caps
*
* Ported to JavaScript By John Resig - http://ejohn.org/ - 21 May 2008
* Original by John Gruber - http://daringfireball.net/ - 10 May 2008
* License: http://www.opensource.org/licenses/mit-license.php
*/
(function(){
var small = "(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|v[.]?|via|vs[.]?)";
@gasi
gasi / MultitouchController.as
Created June 9, 2011 08:26
OpenZoom Multitouch IViewportController
// Author: http://getsatisfaction.com/people/natxopedreira
// Source: http://getsatisfaction.com/openzoom/topics/implementing_gesture_controller
package org.openzoom.flash.viewport.controllers
{
import flash.display.Graphics;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
@gasi
gasi / results.txt
Created June 9, 2011 09:46
Sorting under the influence of `undefined`
Original
[ { id: 1, created: 300 },
{ id: 2, created: 200 },
{ id: 3, created: 500 },
{ id: 4 },
{ id: 5, created: 400 },
{ id: 6, created: 100 },
{ id: 7 } ]
Naive
@gasi
gasi / OpenZoomCatalogViewerSample.as
Created June 16, 2011 05:43
OpenZoom catalog viewer sample
////////////////////////////////////////////////////////////////////////////////
//
// OpenZoom SDK
//
// Version: MPL 1.1/GPL 3/LGPL 3
//
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
@gasi
gasi / twitter-changes.sh
Created June 17, 2011 08:00
Track Twitter Unfollowers
#!/bin/sh
#
# Track Twitter Unfollowers
#
# Run script daily using crontab and TextMate as follows:
# $ mate -w | crontab
# …paste `* */6 * * * /path/to/twitter-changes.sh`
#
# Adapted to Mac OS X from original script by Samuel Alba:
@gasi
gasi / akamai.js
Created February 17, 2012 17:31
Purge Akamai CDN using Node.js
var request = require('request');
var settings = {
AKAMAI_USER: 'test',
AKAMAI_PASSWORD: '...',
AKAMAI_NOTIFICATION_EMAIL: ''
};
var akamai = exports;
var SOAP_URL = 'https://ccuapi.akamai.com:443/soap/servlet/soap/purge';
@gasi
gasi / photo-standouts.md
Created April 10, 2013 19:03
Price comparison for photo standouts