See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.
For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.
Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.
/ At the client, just use a normal post. I use jQuery and do an AJAX post | |
// In your HTML | |
<form id="uploadForm" autocomplete="off" action="" method="post" enctype="multipart/form-data"></form> | |
<input id='fileId' type="file" accept="image/*"> | |
// In you JS | |
var $form = $('#uploadForm'); | |
var $file = $('#fileId'); |
var source = new EventSource('http://localhost:8080'); | |
source.addEventListener('message', function(data){ | |
console.log(data); | |
}); | |
source.addEventListener('open', function(){ | |
console.log('Conexão aberta!'); | |
}); |
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
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); |
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.'); |
#! /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. |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
/* | |
copy header-template.html which will have placeholders for injecting css,js | |
*/ | |
copy: { | |
main: { | |
files: [ |
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)