I hereby claim:
- I am kvnn on github.
- I am kvnn (https://keybase.io/kvnn) on keybase.
- I have a public key ASDW92CSGzTGiBV6BEFOSs9uwc1SzTUnYfGWT3DWJd3GAwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Author: kvnn // @kevinriggen // [email protected]
Pusher private-channels require authentication [i].
Lambda functions [ii] are a good candidate for doing the computation that determines whether a user is authenticated for a private channel, or not.
An API Gateway resource [iii] is necessary to receive the Pusher client's request & send it to the Lambda function, then send the Lambda function's response back
define(["require", "exports"], function (require, exports) { | |
exports.YouTubeHelper = function (settings) { | |
// MEMBERS & DEFAULTS ################################################################################################################################################# | |
var documentRef; | |
var originURL = ""; // for cross site checks | |
var targetContainer; | |
var target; | |
var parentContainer; // used for adding popups back into the original spot |
# This hasn't been tested. I found it here: http://news.ycombinator.com/item?id=4290203 | |
[hooks] | |
pretxncommit.pip = bash -c "diff -u requirements.txt <(source env/bin/activate && |
/* | |
* An example of imagesLoaded's cache behavior | |
* see http://jsfiddle.net/FVLbn/2/ | |
*/ | |
var imgUrls = ['http://3.bp.blogspot.com/-K07eebumZmc/TvN1SmVvZvI/AAAAAAAACUI/TtxP5n9aL4w/s1600/strenco_steam_robot_1.jpg', 'http://www.warcrafthuntersunion.com/wp-content/uploads/2011/07/robot1.jpg','http://4.bp.blogspot.com/-il7IWW4_nyA/T5qojE8_FYI/AAAAAAAAC7M/D7mQZVkA4a8/s1600/nod32robot.png', 'http://neuronmnit.org/wp-content/uploads/2011/08/1312290130-21.jpg'] | |
var images, | |
image1 = $('<img />').attr('src', imgUrls[0]), |
from compressor.filters import CompilerFilter | |
class CoffeeCompilerFinder(staticfiles.finders.AppDirectoriesFinder): | |
""" | |
A quick hacked up staticfiles-finder that will automatically recompile .coffee files to .js and serve the .js file | |
It will respond to a request for /foo/bar/baz.js and if the coffee-file with the same name in that same dir is newer then | |
then js-file requested then the js-file will be recompiled. | |
I did this to not have to manually recompile my scripts or use the watcher and still be compatible with require.js | |
without have to change the code once i deploy with compiled js-files. it depends on django-compressor at the moment | |
but if you dont use that its just a small class to lift out from it. |
''' | |
This is a coffeescript file that when loaded will, | |
for all text and password inputs: | |
1. remove field label using .prev('label') | |
2. insert the label's text into the value of the field input | |
3. blank the field input when a user focuses on the field | |
maiden_text = (e) -> | |
''' |
''' Useage '''' | |
# Declare our item | |
store = Store.objects.get(pk=pk) | |
# Define our models | |
stores = Store.objects.all() | |
# Ask for the next item | |
new_store = get_next_or_prev(stores, store, 'next') | |
# If there is a next item | |
if new_store: | |
# Replace our item with the next one |