Skip to content

Instantly share code, notes, and snippets.

View rdio-cors-example.js
var url = 'https://services.rdio.com/api/1/';
var oReq = new XMLHttpRequest();
oReq.onload = function(e) {
if(oReq.readyState === 4) {
if(oReq.status === 200) {
var response = JSON.parse(oReq.responseText);
console.info(response);
} else {
console.error(oReq);
@dasevilla
dasevilla / github-issue-to-phab-task.py
Created May 6, 2014
Copy GitHub issues to Phabricator
View github-issue-to-phab-task.py
import json
import os
import requests
GITHUB_TOKEN = os.environ.get('GITHUB_TOKEN')
if GITHUB_TOKEN is None:
raise Exception('Missing GITHUB_TOKEN from os.environ')
@dasevilla
dasevilla / desk-email-case-to-slack.json
Last active Aug 29, 2015
Send case notifications from Desk to Slack
View desk-email-case-to-slack.json
{
"icon_url": "http://www.desk.com/resources/branding/desk-com-logo-mobile.png",
"attachments": [
{
"fields": [
{
"short": false,
"value": "{{case.customer.name}} {{case.customer.email}}",
"title": "From"
},
@dasevilla
dasevilla / gist:9837849
Created Mar 28, 2014
Start and pause a track at specific positions
View gist:9837849
R.player.on("change:position", function(newValue) {
console.log("the position is now " + newValue);
if (newValue == 30) {
R.player.pause();
}
});
R.player.play({
source: "t2866554",
initialPosition: 5
@dasevilla
dasevilla / station-embed.py
Created Mar 4, 2014
Given an artist short URL, print the artist station iframe URL. To be used with https://github.com/rdio/rdio-simple
View station-embed.py
#!/usr/bin/env python
from __future__ import unicode_literals
import sys,os.path
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from rdio import Rdio
from rdio_consumer_credentials import RDIO_CREDENTIALS
try:
@dasevilla
dasevilla / rdio-catalog-match.py
Created Jan 10, 2014
Example of using The Echo Nest for bulk catalog matching to Rdio. This example depends on http://echonest.github.io/pyechonest/
View rdio-catalog-match.py
import logging
import time
from pyechonest import config, catalog
config.ECHO_NEST_API_KEY = 'YOUR_API_KEY'
ECHO_NEST_SLEEP_LENGTH = 10 # seconds
View rdio-ios-sdk-releases.md

While we prefer that everyone use the latest release:

http://www.rdio.com/media/static/developer/ios/rdio-ios.tar.gz

You can access previous releases:

http://www.rdio.com/media/static/developer/ios/releases/rdio-ios-1.0.tar.gz
http://www.rdio.com/media/static/developer/ios/releases/rdio-ios-1.1.tar.gz
http://www.rdio.com/media/static/developer/ios/releases/rdio-ios-1.2.tar.gz

http://www.rdio.com/media/static/developer/ios/releases/rdio-ios-1.3.0.tar.gz

@dasevilla
dasevilla / task-from-chrome.applescript
Created Sep 17, 2013
Create a task in Things from current Google Chrome tab
View task-from-chrome.applescript
tell application "Google Chrome"
set theTab to active tab of first window
set theURL to the URL of theTab
set theTitle to the title of theTab
end tell
tell application "Things"
set newTodoName to "Review \"" & theTitle & "\""
set newTodo to make new to do at beginning of list "Inbox"
set name of newTodo to newTodoName
@dasevilla
dasevilla / daily-template.applescript
Last active Dec 18, 2015
AppleScripts to create a daily note.
View daily-template.applescript
-- The title will be today's date, it will be tagged with 'daily', and will be placed in the 'Inbox' notebook.
tell application "Evernote"
set theTitle to do shell script "date +%Y/%m/%d"
set theTags to {"daily"}
set theNotebook to "Inbox"
set theNote to create note with text "" title theTitle tags theTags notebook theNotebook
tell theNote to append html "<div><strong>Links</strong></div><div><ul><li>None</li></ul></div><div><hr /></div><div>Today</div>"
end tell
@dasevilla
dasevilla / evernote-gmail-bulk-import.js
Last active May 4, 2017
Google Apps Script to bulk-import Gmail messages into Evernote.
View evernote-gmail-bulk-import.js
/**
* For every thread with the `Evernote` label:
* - Forward each message in the thread to your Evernote email address
* - Remove the Evernote label
*
* TODO: Figure out a way to trigger this script when a new thread is tagged, right now I run it manually.
*/
/**
* Your evernote Gmail label. Where the emails will be pulled from.