Skip to content

Instantly share code, notes, and snippets.

@drewblaisdell
drewblaisdell / gist:5213ebb284a3bf251669
Created June 4, 2014 01:29
Downloading the newest snap from Snapchat
var snapchat = require('node-snapchat'),
fs = require('fs'),
username = "username",
password = "password";
var client = new snapchat.Client({ username: username, password: password });
client.on('loggedin', function(){
var timestamp = String(Math.round(new Date().getTime() / 1000));
client.getSnaps(timestamp, function(result){
@drewblaisdell
drewblaisdell / drewModule.js
Created June 9, 2015 18:08
Singleton w/ closure
var drewIsCool = false;
module.exports = {
isDrewCool: function() {
return drewIsCool;
},
makeDrewCool: function() {
drewIsCool = true;
}