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
View = require './view' | |
template = require './templates/thumb' | |
module.exports = class ThumbnailView extends View | |
tagName: 'li' | |
template: template | |
events: | |
'click .delete-photo': 'deleteImage' |
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
<div id="left-pane"> | |
<h1 id="product_name">{{product_name}}</h1> | |
{{#if photos}} | |
<div class="carousel-wrapper"> | |
<a href="#" class="carousel-btn prev" id="prev"><img src="images/prev.png"></a> | |
<a href="#" class="carousel-btn next" id="next"><img src="images/next.png"></a> | |
<ul id="carousel"> | |
{{#photos}} | |
<li><img src="{{.}}"></li> | |
{{/photos}} |
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
submitForm: (e) -> | |
e.preventDefault() | |
# Reset everything | |
containsEmail = false | |
containsPassword = false | |
shortPassword = false | |
notValidEmail = false | |
email = @$el.find('[name="email"]').val() | |
password = @$el.find('[name="password"]').val() |
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
var async = require('async'); //Dat speed | |
exports.loadAudioDefault = function(req, res) | |
{ | |
//This route returns a json object with an array of all the MongoDB documents | |
//returned by the query. These documents are audio files. | |
this.db.collection('audio', function(err, collection) | |
{ | |
var audio = { | |
'audio':[], | |
'settings':{ |
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
extends layout | |
block content | |
div#form | |
input#userID(type='text', name='user', placeholder='enter username') | |
br | |
textarea(type='textarea', name='text', placeholder='enter tweet', id='tweet') | |
br | |
button#submitTweet(type='button') Tweet | |
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 sys | |
file = open(sys.argv[1]) | |
for line in file: | |
cacheLine = line.strip().replace(' ', '') | |
if (len(cacheLine[:-1]) >= int(cacheLine[-1])): | |
print cacheLine[::-1][int(cacheLine[-1])] | |
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
@invite = (email, agencyId, callback) -> | |
(app.get 'users').findOne {email: email}, (error, existingUser) -> | |
if existingUser | |
(app.get 'users').update {_id: existingUser._id}, | |
{$addToSet:{agencies:agencyId}}, (error) -> | |
addToTeam agencyId, existingUser._id, (error) -> | |
console.log 'here' | |
app.EmailHandler.invite email, agencyId, -> | |
callback() |
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
request = require 'request' | |
cheerio = require 'cheerio' | |
deps = ["git" , | |
"github", | |
"ssh", | |
"monitoring", | |
"favorite", | |
"gravatar", |
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
{ | |
github: { | |
username: "elbuo8" | |
picture: "ballz", | |
languages: {"Java": 1, "Coffee": 3, "Python": 7, "Go": 1}, | |
points: 75, | |
repos: 4, | |
followers: 7 | |
}, | |
stackoverflow: { |
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
tarname = os.getcwd() + '/' + data['name'] + '.tgz' | |
tar = tarfile.open(tarname, 'w:gz') | |
for filename in os.listdir(os.getcwd()): | |
tar.add(filename) | |
tar.close() | |
print tarname | |
files = {'file': open(tarfile, 'rb')} |
OlderNewer