Skip to content

Instantly share code, notes, and snippets.

Plínio Balduino pbalduino

Block or report user

Report or block pbalduino

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pbalduino
pbalduino / testFilter.spec.js
Created Aug 17, 2017
How to test a filter in VUE.js 2
View testFilter.spec.js
/* component */
<script>
export default {
name: 'sample',
filters: {
round: function (value) {
if (!value) return NaN;
return Math.round(value);
}
@pbalduino
pbalduino / highperfjs.txt
Created Jun 22, 2017
High Performance JavaScript reference
View highperfjs.txt
https://www.slideshare.net/nzakas/high-performance-javascript-yuiconf-2010
https://www.slideshare.net/nzakas/writing-efficient-javascript/24-Scope_Chain_Augmentation_The_with
https://www.slideshare.net/caelumdev/otimizaes-de-performance-web-desafios-do-mundo-mobile
https://www.slideshare.net/caelumdev/performance-web-alm-do-carregamento
https://www.w3schools.com/js/js_performance.asp
@pbalduino
pbalduino / aws-google.txt
Created Nov 10, 2016
Equivalências entre AWS e Google Cloud
View aws-google.txt
Compute
EC2/AMI -> Compute Engine
Elastic Beanstalk -> App Engine
ECS -> Container Engine
Lambda -> Cloud Functions
Storage
S3 -> Cloud Storage
@pbalduino
pbalduino / star.logo
Created Aug 1, 2016
A little star with Logo
View star.logo
View Gemfile
source 'http://gemcutter.org'
gem "bj"
gem "hpricot", "~> 0.6"
gem "sqlite3-ruby", "~> 1.3.1", :require => "sqlite3"
gem "aws-s3", :lib => "aws/s3"
gem "rails", "= 2.3.10"
gem "authlogic", "~> 2.1.6"
group :development, :test do
gem 'mongrel', :require => false
@pbalduino
pbalduino / environment.rb
Created Jul 12, 2016
config/environment.rb
View environment.rb
# Be sure to restart your server when you modify this file
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.10' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
Rails::Initializer.run do |config|
# Settings in config/environments/* take precedence over those specified here.
@pbalduino
pbalduino / environment.rb
Created Jul 12, 2016
config/environment.rb
View environment.rb
# Be sure to restart your server when you modify this file
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.10' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
Rails::Initializer.run do |config|
# Settings in config/environments/* take precedence over those specified here.
@pbalduino
pbalduino / preinitializer.rb
Created Jul 12, 2016
config/preinitializer.rb
View preinitializer.rb
begin
require "rubygems"
require "bundler"
rescue LoadError
raise "Could not load the bundler gem. Install it with `gem install bundler`."
end
if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.24")
raise RuntimeError, "Your bundler version is too old for Rails 2.3." +
"Run `gem install bundler` to upgrade."
View boot.rb
class Rails::Boot
def run
load_initializer
Rails::Initializer.class_eval do
def load_gems
@bundler_loaded ||= Bundler.require :default, Rails.env
end
end
You can’t perform that action at this time.