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
"use strict"; | |
var path = require("path"); | |
var fs = require("fs"); | |
var Twit = require('twit'); | |
var rateLimiter = {}; | |
var luckyNumber = Math.round(Math.random()*60); | |
var re = /\d+/; | |
var oauth = JSON.parse(fs.readFileSync("./config/twitter_credentials.js", "UTF8")); |
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
express.get('/', function(req, res){ | |
http.get('www.outrolugar.com.br/api/', function(response){ | |
//Posso fazer isso??? | |
//Ou como faço algo parecido | |
res = response; | |
res.end(); | |
}) | |
}) |
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
(function() { | |
var childProcess = require("child_process"); | |
var oldSpawn = childProcess.spawn; | |
function mySpawn() { | |
console.log('spawn called'); | |
console.log(arguments); | |
var result = oldSpawn.apply(this, arguments); | |
return result; | |
} | |
childProcess.spawn = mySpawn; |
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'); | |
function copyFileToStructure(filename, done){ | |
async.parallel([ | |
async.apply(teste, filename , 'param'), | |
async.apply(teste, filename , 'param') | |
], function(result) { | |
console.log("poa"); | |
console.log(done); | |
done(); |
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
IniFile | |
= first: Section (BlankLine* others: Section*) {others.unshift(first); return others; } | |
Section | |
= section: SectionHeader "\n" values: KeyValues* {return {section:values}} | |
SectionHeader | |
= "[" section_name: word "]" {return section_name} | |
KeyValues | |
= a: word "=" value: word "\n"? {var o = {}; o[a]=value; return o;} |
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
alias workrebase="git checkout master && git pull origin master && git checkout work && git rebase master" | |
alias worksync="workrebase && git checkout master && git merge work && git push origin master && git checkout work" | |
alias workghpagesrebase="git checkout gh-pages && git pull origin gh-pages && git checkout work && git rebase gh-pages" | |
alias workghpagessync="workghpagesrebase && git checkout gh-pages && git merge work && git push origin gh-pages && git checkout work" |
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
'use strict'; | |
var schedAPI = require('./schedAPI'); | |
var handlebars = require("handlebars"); | |
var fs = require('fs'); | |
var partialsDir = __dirname + '/template/partials'; | |
var XLSX = require('xlsx'); | |
var Excel = require('exceljs'); | |
/** Retorna as informações do sched e gera as placas em html */ | |
schedAPI.getSessionExport((err,session) => { |
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
"use restrict"; | |
const Hapi = require('hapi'); | |
const CookieAuth = require('hapi-auth-cookie'); | |
const server = new Hapi.Server(); | |
server.connection({ | |
host: 'localhost', | |
port: 3000 | |
}); |
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
'use strict'; | |
import Vue from 'vue'; | |
export default { | |
getCourses() { | |
return Vue.resource('/courses').get(); | |
}, | |
putCourses(){ | |
return Vue.resource('/courses').put(); |
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 webpack = require('webpack'); | |
const compiler = webpack(require('./webpack.config')); | |
compiler.watch({ // watch options: | |
aggregateTimeout: 300, // wait so long for more changes | |
poll: true // use polling instead of native watchers | |
// pass a number to set the polling interval | |
}, function(err, stats) { | |
console.log(stats.toString()); |
OlderNewer