Skip to content

Instantly share code, notes, and snippets.

View bluewhalelabs's full-sized avatar

Gregarious Narain bluewhalelabs

View GitHub Profile
@bluewhalelabs
bluewhalelabs / chute.photo-shortener.js
Created September 20, 2012 03:24
Chute Photo Shortener JS
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
$(document).ready(function() {
var shortcut = document.location.hash.replace('#','');
if (shortcut.length) {
$.getJSON("http://api.getchute.com/v1/assets/" + shortcut + "?callback=?", function(data){
$('body').html('<img src=' + data.data.url + ' />')
});
}
});
@bluewhalelabs
bluewhalelabs / modal.styles.css
Created September 5, 2012 21:20
Tinymeme Modal Styles
#memeModal{
border-radius: 0;
background-image: none;
padding: 0;
margin-left: -210px;
width: 420px;
padding: 5px;
background-color: #fff;
}
#memeModal .meme-image-container{
@bluewhalelabs
bluewhalelabs / sample.skeleton.html
Created August 31, 2012 01:02
TinyMeme HTML Templates
<!-- This HTML can be used as a base page -->
<html>
<body>
<select id='trays'></select>
<div class="stage">
<div id='tray'>
</div>
<div class="preview canvas">
@bluewhalelabs
bluewhalelabs / index.html
Created August 31, 2012 00:35
TinyMeme Simple HTML
<html>
<head>
<title>TinyMeme: Lenovo</title>
<script id="traysTemplate" type="text/x-jquery-tmpl">
{{#data}}
<option value="{{id}}" data-name="{{name}}">{{name}}</option>
{{/data}}
</script>
@bluewhalelabs
bluewhalelabs / file.json
Created August 24, 2012 17:55
Chute File JSON
'data' => {
'files' => [
{
'filename' => 'file.name',
'md5' => 'MD5',
'size' => 12345
}
],
'chutes' => []
}
@bluewhalelabs
bluewhalelabs / gist:3042364
Created July 3, 2012 19:42
Sample Chute Asset JSON
{
"data": {
"chute": {
"id": 285406,
"user": {
"id": 729,
"name": null,
"username": null,
"avatar": "http://static.getchute.com/v1/images/avatar-100x100.png"
},
@bluewhalelabs
bluewhalelabs / avatars-request-headers
Created June 26, 2012 12:22
Headers required for accessing Avatars.io API
'x-client_id' : 'ABCDEFGHIJKLMNOPQRSTUV' // Your Apps Client ID
'Authorization': 'OAuth ABCDEFGHIJKLMNOPQRSTUV' // Your OAuth Access Token
@bluewhalelabs
bluewhalelabs / gist:2653728
Created May 10, 2012 15:02
Slidechute Asset Data
// -----------------------------------------------------------
// Sample Upload Data
// -----------------------------------------------------------
// time - Timestamp for the upload
// moderated - Boolean indicating if upload was moderated
// asset - Array of Asset Hashes
// -----------------------------------------------------------
{
time: 1335624522.467072, // Timestamp
moderated: false, // Boolean indicating if the asset has been published
{
"data": {
"id": 972079,
"url": "http://media.getchute.com/media/44SHdnlc",
"is_portrait": true,
"name": "",
"created_at": "2012-04-18T21:15:35Z",
"updated_at": "2012-04-18T21:15:35Z",
"height": 453,
"width": 604,
{
"data": {
"id": 285406,
"user": {
"id": 729,
"name": null,
"username": null,
"avatar": null
},
"name": "Samples",