This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"schema": "https://example.com/badge/1", | |
"mustSupport": [], | |
"title": "School of Webcraft Responder", | |
"description": "This badge is in recognition of the helpful responses you have provided to fellow members of the School of Webcraft.", | |
"timestamp": "1288882617", | |
"expires": "8462729988", | |
"badgeURL": "https://badger.mozilla.com/badges/asdf1234", | |
"issuer": "https://badger.mozilla.com/", | |
"issuerName": "P2PU School of Webcraft", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(when (load "flymake" t) | |
(defun flymake-pyflakes-init () | |
(let* ((temp-file (flymake-init-create-temp-buffer-copy | |
'flymake-create-temp-inplace)) | |
(local-file (file-relative-name | |
temp-file | |
(file-name-directory buffer-file-name)))) | |
(list "pychecker.sh" (list local-file)))) | |
(add-to-list 'flymake-allowed-file-name-masks | |
'("\\.py\\'" flymake-pyflakes-init))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Mostly taken from: | |
# http://nedbatchelder.com/blog/201103/quick_and_dirty_multithreaded_django_dev_server.html | |
import os | |
import site | |
from django.core.management import execute_manager |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rails 3.0.3 Controller. Just return the parameters as a string. | |
class HomeController < ApplicationController | |
protect_from_forgery :except => :upload | |
def upload | |
render :text => params.to_s | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import soundcloud | |
# Create a new client that uses the user credentials oauth flow | |
client = soundcloud.Client(client_id='YOUR_CLIENT_ID', | |
client_secret='YOUR_CLIENT_SECRET', | |
username='YOUR_USERNAME', | |
password='YOUR_PASSWORD') | |
# print the username of the authorized user | |
print client.get('/me').username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import soundcloud | |
from bottle import get, post, redirect, request | |
def soundcloud_client(): | |
return soundcloud.Client( | |
client_id='YOUR_CLIENT_ID', | |
client_secret='YOUR_CLIENT_SECRET', | |
redirect_uri='http://localhost:3000/soundcloud/connected' | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'Services/Soundcloud.php'; | |
$client = new Services_Soundcloud('client_id', 'client_secret'); | |
$client->setAccessToken('access_token'); | |
$playlist = array( | |
'playlist[title]' => 'My Playlist', | |
'playlist[artwork_data]' => '@/path/to/file.jpg' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi [Name], | |
Thanks for reaching out. It sounds like it could be an interesting position, but I'm very happy with my current position at SoundCloud. | |
Best of luck finding the right candidate! | |
Cheers, | |
Paul |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<script src="http://connect.soundcloud.com/sdk.js"></script> | |
<script> | |
window.onload = function() { | |
SC.initialize({ | |
client_id: 'YOUR_CLIENT_ID' | |
}); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class Author(models.Model): | |
name = models.CharField(max_length=255) | |
class Book(models.Model): | |
title = models.CharField(max_length=255) | |
author = models.ForeignKey(Author) |
OlderNewer