This file contains 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
[Filepicker.io](http://addons.heroku.com/filepicker) provides file uploading and content management for developers as an [add-on](http://addons.heroku.com) for Heroku. | |
Filepicker.io excels any time you want to add uploading or cloud file integration into your application. Worried about running into the Heroku 30-second-timeout with big files? No worries, we can handle files upward of 100GB. Need to store them on S3? Done, no questions asked. | |
Even better, Filepicker.io provides: | |
* Integration with 17 content providers, so your users can pull in content directly from the cloud, increasing their engagement in your application. No wrestling with APIs required - one line of code and your app is set up with Dropbox, Facebook Photos, Google Drive, Instagram, and many more. | |
* Powerful image processing functionality, so you can take uploads from the user and crop them to a 128x128 profile pictured centered around their face, for example | |
* Stellar performance, streaming large files in parallel at speeds 4-10 times |
This file contains 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 web | |
from pyquery import PyQuery as pq | |
import re | |
urls = ( | |
'/(.*)', 'hn' | |
) | |
app = web.application(urls, globals()) | |
This file contains 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
(function(){ | |
var time = +new Date; | |
//no idea what that did, let's check it out | |
debugger; | |
//Pretty cool - you can modify the local variables as well via the web inspector | |
alert(time); | |
})(); |
This file contains 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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" | |
lang="en-US"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; | |
charset=utf-8" /> | |
<title>Zencoder Dropzone</title> | |
<!-- jQuery Include --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<!-- Filepicker.io Include --> |
This file contains 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
<!-- Add this just before the </head> tag --> | |
<script type="text/javascript"> | |
$(function() { | |
//Put your Filepicker.io API key here: | |
filepicker.setKey('A9gfeq0CMTMeP1dR86vcxz'); | |
$('a').click(function(e) { | |
e.preventDefault(); // This keeps the normal link | |
// behavior from happening | |
filepicker.pickAndStore({},{location: 's3'}, | |
function(fpfiles){ |
This file contains 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
<!-- Replace the previous script tag with this one --> | |
<script type="text/javascript"> | |
$(function() { | |
//Put your Filepicker.io API key here: | |
filepicker.setKey('A9gfeq0CMTMeP1dR86vcxz'); | |
//Zencoder API key | |
var zenKey = 'ce887203717c4417267eeb7b59b55885'; | |
$('a').click(function(e) { | |
e.preventDefault(); // This keeps the normal link behavior from happening | |
//Specifying all the extensions that zencoder can handle, you may want to choose a subset |
This file contains 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
$(function(){ | |
var jcrop_api; | |
var changeCrop = function(c){ | |
//alert(c.w); | |
var url = $('#convert_url_link').attr('href'); | |
var cropparams = [Math.floor(c.x),Math.floor(c.y),Math.floor(c.w),Math.floor(c.h)].join(); | |
newurl = url.replace(/crop=[0-9]+,[0-9]+,[0-9]+,[0-9]+/, 'crop='+cropparams); | |
$('#convert_url_link').attr('href', newurl ); | |
$('#process-image-thumb').attr('src', newurl ); |
This file contains 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
//To use this, in another file call | |
//require("./gm-composite.js")(gm.prototype); | |
//You can then do gm("baseImage.png").composite(gm("watermark.png"), "SouthEast", function(err, composite_gm_obj){...}); | |
var gm = require('gm'); | |
var randInt = function(min, max) { | |
return Math.floor(min + (Math.random() * (max-min))); | |
}; |
This file contains 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
pacat -r -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor | ncat -k --send-only -l -p 1337 > server_output.txt & | |
ssh -R 1339:localhost:1337 hopscotch.inkmobility.com & |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am brettcvz on github. | |
* I am brettcvz (https://keybase.io/brettcvz) on keybase. | |
* I have a public key whose fingerprint is D7C1 CB53 CFA5 D6C8 3856 ECA8 0784 1CD7 F723 9F7C | |
To claim this, I am signing this object: |
OlderNewer