Skip to content

Instantly share code, notes, and snippets.

View dsalazar32's full-sized avatar

David Salazar dsalazar32

View GitHub Profile
<recommendation>
<method value="getRecEnginePlayList" numberOfRecords="1" countryCode="US" userID="1601" numResults="1" artistID="P 527862" ipAddress="67.63.37.2" countryHasRadio="true" language="en">
<items>
<item>
<can_play_sv>1</can_play_sv>
<can_play_pr>1</can_play_pr>
<image>
/storage/storage?fileName=/.elhood.com-2/usr/77556/image/hi-thumbnail/093624898825.sml.jpg
</image>
<album>Elevator</album>
#Currently song_file is returned as a relative path. Insert the following host: http://media.cyloop.com
<song_file>
/storage/storage?fileName=/.elhood.com-2/usr/77556/audio/093624898863_00006_192.mp3
</song_file>
<song_id>277017</song_id>
# media_id is the song_id value that was retrieved from the sample xml document
# radio will always be set to true
Request:
http://assets.cyloop.com/storage/storageTimestamp?media_id=277017&radio=true
Response:
2009-12-23_16:09:36.821-0500|full
http://assets.cyloop.com/storage/storage?fileName=E80ECA9B144F425BDF882C787C235A616C5418AE80A0E738BF7C07614E355CB911EC1A0F0201C3E5FB41EE6A41743476426123660E081711990A6D628395FA5AE61364D827A7E3234E411C0DE6BE1E8AF4971099C5760EA32FE779972A01CD1BCC68ABBAC2A3985DFBF14F15882FAB4ACA1E29DED234123B11311A31D155F021E3FC84DF187D0E32&isRadio=true
E80ECA9B144F425BDF882C787C235A616C5418AE80A0E738BF7C07614E355CB911EC1A0F0201C3E5FB41EE6A41743476426123660E081711990A6D628395FA5AE61364D827A7E3234E411C0DE6BE1E8AF4971099C5760EA32FE779972A01CD1BCC68ABBAC2A3985DFBF14F15882FAB4ACA1E29DED234123B11311A31D155F021E3FC84DF187D0E32
@dsalazar32
dsalazar32 / informatica.rb
Created January 11, 2012 17:49
Informatica src description
require 'rubygems'
require 'sequel'
require 'net/http'
require 'net/https'
require 'json'
KEY = 'XXX'
CONN = Sequel.connect(:adapter => 'mysql2', :host => 'localhost',
:user => 'root', :database => 'auto_informatic')
@dsalazar32
dsalazar32 / tabul8.js
Created January 26, 2012 03:36
jQuery tabbing plugin utility
// Plugin :)
(function($){
$.fn.extend({
tabul8: function() {
var args = arguments[0];
var binded = $(this).children().bind('click', function(e) {
var elem = $(e.target);
var attr = elem.attr('data-callback');
if (elem[0].tagName == 'A') e.preventDefault();
if (attr !== undefined && attr !== false && !elem.hasClass('selected'))
@dsalazar32
dsalazar32 / as
Created March 8, 2012 21:50
AWS Auto-Scaling procedure
Just a few steps in order to autoscale your application...
In this example an autoscaling policy was created for www.altaconfidelidad.com "alta"
Current infrastructure for alta contains:
1 micro ec2 instance
1 load balancer
1 EBS volume attached for persistant storage
Requirements:
@dsalazar32
dsalazar32 / gist:2777913
Created May 23, 2012 21:21
PostgresDB tips to add a new role to an existing db..
PostgresDB tips to add a new role to an existing db..
# create user
- add user USER with password 'PASSWORD';
---
# grant privileges to the database
- grant all privileges on database DATABASE to USER;
@dsalazar32
dsalazar32 / split-prof.txt
Last active October 23, 2015 19:51
csvspltr ruby-prof results
root@vagrant-ubuntu-trusty-64:~/csvspltr/ruby# ruby csvspltr splt ../sample/star2002-1.csv --lines=500 --prof=true
Measure Mode: wall_time
Thread ID: 70267260746120
Fiber ID: 70267262684940
Total Time: 12.393187999725342
Sort by: total_time
%total %self total self wait child calls Name
--------------------------------------------------------------------------------
100.00% 0.00% 12.393 0.000 0.000 12.393 1 Csvspltr#splt