term
cd Web/
touch server.js
server.js
#!/usr/bin/env bash | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get install git -y | |
sudo apt-get install wget -y | |
sudo apt-get install curl -y | |
sudo apt-get install nginx -y | |
sudo apt-get install gcc -y | |
sudo apt-get install g++ -y |
// Your accountSid and authToken from twilio.com/user/account | |
var accountSid = 'AUTH_SID'; | |
var authToken = "AUTH_KEY"; | |
var client = require('twilio')(accountSid, authToken); | |
var text = "TEXT_CONTENT"; | |
var users = [--phone number array-]; | |
for (var i=0;i<users.length ; i ++) { | |
var sender = "+886" + users[i]; |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash | |
. ~/.nvm/nvm.sh | |
nvm install v4.2.2 | |
nvm alias default v4.2.2 | |
nvm use default | |
# install other service | |
npm install -g sails | |
npm install -g gulp |
var express = require('express'); | |
var router = express.Router(); | |
/* GET home page. */ | |
router.get('/', function(req, res, next) { | |
res.render('index', { title: 'Express' }); | |
}); | |
var users = { |
var stream = require('stream'); | |
// Initiate the source | |
var bufferStream = new stream.PassThrough(); | |
// Write your buffer | |
bufferStream.end(new Buffer('Test data.')); | |
// Pipe it to something else (i.e. stdout) | |
bufferStream.pipe(process.stdout); |
(($) -> | |
options = | |
videoId: "youtube video id" | |
width: "640" | |
height: "480" | |
playerVars: | |
autoplay: 0 | |
controls: 1 | |
modestbranding: 0 |
I freaking love working with technologies like Grunt and Gulp, and wanted to share how to get my current EE front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, Craft, etc).
#!/bin/bash | |
for FILE in `find . -name "*.js" -type f -o -path './node_modules' -prune -o -path './components' -prune` | |
do | |
if [ -e $FILE ] ; then | |
COFFEE=${FILE//.js/.coffee} | |
echo "converting ${FILE} to ${COFFEE}" | |
js2coffee "$FILE" > "$COFFEE" | |
else |
聲明: 此並非爲官方聲明。我並非爲 io.js 官方代表,如果有任何問題,歡迎在 node-forward
一起討論