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
//Executed through a self-invoking anonymous function | |
(function(){ | |
//declare the variables that we will need | |
var imgName = "10584590_588581994607732_199003263_n.jpg"; | |
var uriA = "http://photos-e.ak.instagram.com/hphotos-ak-xfa1/10584590_588581994607732_199003263_n.jpg"; | |
var uri1 = "http://instagram.com/p/sLLSiTCXB5/?modal=true"; | |
var uri2 = "http://instagram.com/p/sLLSiTCXB5/"; |
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
#!/bin/bash | |
MODsuff=MOD | |
MP4suff=mp4 | |
for src in `ls -d *.MOD` ; | |
do | |
dest=${src%.$MODsuff}.$MP4suff | |
echo Converting $src to $dest... | |
`./ffmpeg -i "$src" -s 720x405 -vcodec mpeg4 -b 2300k -deinterlace -strict -2 -aspect 16:9 -acodec aac -ab 192k -ar 44100 "$dest"` |
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
var async = require('async'); | |
var ProgressBar = require('progress'); | |
var monk = require('monk'); | |
var ObjectId=require('mongodb').ObjectID; | |
var dest = monk('localhost:27017/storify_localhost'); | |
var backup = monk('localhost:27017/storify_backup'); | |
var userId = ObjectId(YOUR-OBJECT-ID); // monk should have auto casting but we need it for queries |
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
{ content: | |
{ sid: '516f1018384ca80000000011', | |
title: 'node.js news', | |
slug: 'node-js-news', | |
status: 'working', | |
version: 1, | |
permalink: 'http://storify.com/storify/node-js-news', | |
description: null, | |
thumbnail: 'http://storify.com/public/img/default-thumb.gif', | |
date: |
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
var fs = require('fs'); | |
//change these to YOUR filenames | |
//probably we can read it from Book.txt but I was too lazy to implement it :-) and somebody might want to compile only sertain parts of the book | |
var book =[ | |
"frontmatter.txt", | |
"mainmatter.txt", | |
"part1.txt", | |
"chapter1.txt", | |
"part2.txt", | |
"chapter2.txt", |
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
var request = require('request') | |
var apiKey = process.env.API_KEY | |
var workspaceId = process.env.WORKSPACE | |
var assigneeEmail = process.env.ASSIGNEE | |
var url ='https://app.asana.com/api/1.0/tasks' | |
// set up the request | |
var headers = { | |
'Authorization': 'Basic '+ new Buffer(apiKey).toString('base64') |
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
<Body:> | |
<input value="{message}"><h1>{message}</h1> |
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
sudo curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash - | |
sudo yum -y install nodejs |
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
const http = require('http') | |
http.createServer((req, res)=>{res.end(`Happy Monday America! | |
Your Node environment is ${process.env.NODE_ENV} | |
`)}).listen(80) |
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
const assert = require('assert') | |
const solution = (str) => { | |
const checkSubs = (s, oldResults=[]) => { | |
let start = s.indexOf('{') | |
let end = s.indexOf('}', start+1) | |
// console.log('yo', s, start, end,s.substring(end+1, s.length)) | |
if (start<0 && end <0) { | |
for (let i = 0; i<oldResults.length; i++) { | |
oldResults[i] += s |
OlderNewer