Skip to content

Instantly share code, notes, and snippets.

View brenoperucchi's full-sized avatar

Breno Perucchi brenoperucchi

View GitHub Profile
@brenoperucchi
brenoperucchi / form_tag.rb
Created December 27, 2015 16:33
Form Block Liquid Filter
require 'i18n'
class FormTag < Liquid::Block
Syntax = /(#{Liquid::QuotedFragment})\s*(by\s*(\d+))?/
def initialize(tag_name, markup, tokens)
@param_name = Liquid::Expression.parse(markup).name.gsub("form_", "")
super
end
def form_nested(params, index, object, html_name)
@brenoperucchi
brenoperucchi / sublime-keymap
Last active January 3, 2016 16:04
Sublime Default Keymap
[
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" },
{ "keys": ["super+ctrl+m"], "command": "list_rails_models" },
{ "keys": ["super+ctrl+c"], "command": "list_rails_controllers" },
{ "keys": ["super+ctrl+v"], "command": "list_rails_views" },
{ "keys": ["super+ctrl+h"], "command": "list_rails_helpers" },
{ "keys": ["super+ctrl+x"], "command": "list_rails_fixtures" },
{ "keys": ["super+ctrl+t"], "command": "list_rails_tests" },
{ "keys": ["super+ctrl+i"], "command": "list_rails_javascripts" },
@brenoperucchi
brenoperucchi / Rails, Puma & Nginx.md
Created February 14, 2023 03:36 — forked from davidteren/Rails, Puma & Nginx.md
Example setup for Puma with Nginx in a Rails app

In the apps config/puma.rb file:

Change to match your CPU core count
# Check using this on the server => grep -c processor /proc/cpuinfo
workers 4

# Min and Max threads per worker
threads 1, 6

app_dir = File.expand_path('../..', FILE)

input
iGain(3.0);
iStop(550);
iPeriod(20);
iDesvio(2.00);
var
vUpBB : Float;
vDownBB : Float;
vUpBBLast : Float;
vDownBBLast : Float;
//+------------------------------------------------------------------+
//| BB-EMA.mq5 |
//| Copyright 2023, Imentore Copy |
//| Breno Cardoso Perucchi |
//+------------------------------------------------------------------+
#property copyright "Copyright Breno Perucchi"
#property description "BB EMA"
#property link "https://www.imentore.com"
#property version "1.32"
#property strict
@brenoperucchi
brenoperucchi / i_bb_ema.mq5
Created May 25, 2023 18:13
Bollinger Band Indicator EMA
//+------------------------------------------------------------------+
//| BB.mq5 |
//| Copyright 2009, MetaQuotes Software Corp. |
//| http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "2009, MetaQuotes Software Corp."
#property link "http://www.mql5.com"
#property description "Bollinger Bands"
#include <MovingAverages.mqh>
//---