cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone git://github.com/jashkenas/coffee-script-tmbundle CoffeeScript
git clone https://github.com/miksago/jade-tmbundle.git Jade
git clone https://github.com/LearnBoost/stylus.git Stylus
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
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () { | |
var Storage = function (type) { | |
function createCookie(name, value, days) { | |
var date, expires; | |
if (days) { | |
date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
expires = "; expires="+date.toGMTString(); |
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
Navigation: | |
cmd-p Goto Anything ('@' for functions, ':' for line number) | |
cmd-r Function finder | |
ctl-g Goto line number | |
cmd-sft-p Command palette | |
cmd-sft-f Find in Files | |
cmd-opt-r Toggle regex when finding | |
cmd-opt-# Columns | |
ctr-# Switch columns |
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
app.use(express.methodOverride()); | |
// ## CORS middleware | |
// | |
// see: http://stackoverflow.com/questions/7067966/how-to-allow-cors-in-express-nodejs | |
var allowCrossDomain = function(req, res, next) { | |
res.header('Access-Control-Allow-Origin', '*'); | |
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE'); | |
res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization'); | |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
/* | |
copy header-template.html which will have placeholders for injecting css,js | |
*/ | |
copy: { | |
main: { | |
files: [ |
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
#! /usr/bin/env bash | |
### | |
# | |
# install_mysql.sh | |
# | |
# This script assumes your Vagrantfile has been configured to map the root of | |
# your application to /vagrant and that your web root is the "public" folder | |
# (Laravel standard). Standard and error output is sent to | |
# /vagrant/vm_build.log during provisioning. |
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 cheerio = require('cheerio'); | |
var request = require('request'); | |
request.get('http://gshow.globo.com/programas/na-moral/videos/feed.atom', function(err, headers, body){ | |
if(err) | |
throw err; | |
if(headers.statusCode !== 200) | |
throw new Error('Resposta não OK.'); |
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 cheerio = require('cheerio'); | |
var request = require('request'); | |
var url = 'http://www.americanas.com.br/produto/7112345/geladeira-refrigerador-frost-free-brastemp-clean-brm39-352-litros-inox'; | |
request.get(url, function(err, res, body){ | |
if(err) | |
throw err; | |
if(res.statusCode !== 200) | |
throw new Error('Resporta não OK ' + res.statusCode); |
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
OlderNewer