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
/** | |
* | |
*Sassified version of tmayr's gist: https://gist.github.com/tmayr/5190565 | |
* | |
*/ | |
.lt-ie9 { | |
.top-bar { | |
background: #2f2f2f; |
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({ | |
pkg: grunt.file.readJSON('package.json'), | |
exec: { | |
set_max_files: { | |
command: 'ulimit -n 1024' | |
}, | |
get_grunt_sitemap: { |
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
pt-BR: | |
flash: | |
actions: | |
create: | |
notice: "%{resource_name} criado com sucesso." | |
alert: "* Preencha todos os campos corretamente." | |
update: | |
notice: "%{resource_name} foi atualizado com sucesso." | |
destroy: | |
notice: "%{resource_name} foi removido com sucesso." |
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
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete | |
# documentation. | |
worker_processes 2 | |
# Help ensure your application will always spawn in the symlinked | |
# "current" directory that Capistrano sets up. | |
working_directory "/home/deployer/myapp.com/current" | |
# listen on both a Unix domain socket and a TCP port, | |
# we use a shorter backlog for quicker failover when busy | |
listen "/tmp/myapp.com.sock", :backlog => 64 | |
listen 8080, :tcp_nopush => true |
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
When building a new instance of Amazon EC2 choose quick-start-1 as the security group not default | |
#LOCALLY | |
$ capify . | |
$ chmod +x config/unicorn_init.sh | |
$ git add . | |
$ git commit -m "deployment configs" | |
If rebuilding an instance don't forget to remove the ssh keys |
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
gem 'spree', github: 'spree/spree', branch: '2-1-stable' | |
bundle update spree | |
bundle exec rake railties:install:migrations | |
bundle exec rake db:migrate |
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
namespace :ubuntu do | |
desc "Setup Environment" | |
task :setup_env, :roles => :app do | |
update_apt_get | |
install_dev_tools | |
install_git | |
install_subversion | |
install_sqlite3 | |
# Install and setup RVM instead of old Rails stack | |
#install_rails_stack |
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
.lt-ie9 .top-bar { | |
background: #2f2f2f; | |
*zoom: 1; | |
overflow: visible; | |
} | |
.lt-ie9 .top-bar:before, .lt-ie9 .top-bar:after { | |
content: " "; | |
display: table; | |
} | |
.lt-ie9 .top-bar:after { clear: both; } |
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
###################################################### | |
# Proguard file to remove debug logs and NOT kill the application | |
# | |
# @benclayton github.com/benvium 15-12-2014 | |
# | |
# https://gist.github.com/benvium/8995326bc944f47f2c64 | |
###################################################### | |
# To use this file, your project's build.gradle 'buildTypes' section should look like this: | |
# |
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
// Multiplication and division rules... ((+)*(+)=+) ((-)*(-)=+) ((+)*(-)=-) ((-)*(+)=-) | |
const multiply = (x, y) => { | |
let r = Math.exp(Math.log(Math.abs(x)) + Math.log(Math.abs(y))).toFixed(2) | |
return Number((x < 0 && y < 0) ? r : (x < 0 || y < 0) ? -r : r) | |
} | |
const divide = (x, y) => { | |
return (x === 0) ? 0 : multiply(((multiply(x, y) < 0) ? -1.0 : 1.0), Math.exp(Math.log(Math.abs(x)) - Math.log(Math.abs(y)))) | |
} |
OlderNewer