I hereby claim:
- I am paulohp on github.
- I am paulopires (https://keybase.io/paulopires) on keybase.
- I have a public key whose fingerprint is 33BF F157 4477 AD49 71D7 9AC3 82D3 374D 6DC4 ED69
To claim this, I am signing this object:
_.map(results, function(resultUrl){ | |
var dirname = resultUrl.substring(resultUrl.lastIndexOf('/'), 46); | |
if(!fs.existsSync('./some/'+dirname)){ | |
fs.mkdir('./some/'+dirname, 0766, function(err){ | |
if(err) throw err; | |
}); | |
} | |
}); |
I hereby claim:
To claim this, I am signing this object:
{ | |
sugestoes: { | |
codelab: ['angular', 'polymer', 'dart', 'app script', | |
{"google apis": | |
['youtube api', 'maps api', 'drive api'] | |
}], | |
meetup: ['go', 'angular', 'app script', 'google apis'], | |
hackiday: ['go', 'google apis + angularjs', 'app script'] | |
} | |
} |
{ | |
'sugestoes':{ | |
'codelab': ['angular', 'polymer', 'googleApi'], | |
'meetup': ['go'], | |
'hackiday': ['go'] | |
} | |
} |
namespace :config_links do | |
desc "Symlink database.yml" | |
task :database, :roles => :app do | |
run "ln -s #{deploy_to}/#{shared_dir}/config/database.yml #{current_release}/config" | |
end | |
end | |
after "deploy:update_code", "config_links:database" |
require 'bundler/capistrano' | |
require 'capistrano-unicorn' | |
set :default_environment, { | |
:PATH => '/opt/local/bin:/opt/local/sbin:/opt/local/ruby/gems/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', | |
:GEM_HOME => '/opt/local/ruby/gems' | |
} | |
set :application, 'www.awesomeapp.com' |
#app/modelos/imagem.rb | |
class Imagem < ActiveRecord::Base | |
has_attached_file :photo | |
after_create :otimiza | |
def otimiza() | |
if self.photo_file_size < 1000000 #limite imposto pelo smush.it | |
require 'rubygems' #desnecessário caso utilize Ruby 1.9 |
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(50); |
$('#contact-form').submit(function() { | |
var _nome = $('#message_name') | |
var _email = $('#message_email') | |
var _assunto = $('#message_subject') | |
var _body = $('#message_body') | |
var valuesToSubmit = { | |
nome: _nome, | |
email: _email, | |
assunto: _assunto, | |
body: _body |
/*global module:false*/ | |
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
meta: { | |
version: '0.1.0', | |
banner: '/*! PROJECT_NAME - v<%= meta.version %> - ' + | |
'<%= grunt.template.today("yyyy-mm-dd") %>\n' + | |
'* http://www.jvsoftware.com/\n' + |