Skip to content

Instantly share code, notes, and snippets.

View mateusg's full-sized avatar

Mateus Gomes mateusg

View GitHub Profile
1.
Download the excel file with the current data for
= @table
= link_to 'here', '#'
@mateusg
mateusg / active_admin.pt-BR.yml
Created November 7, 2013 22:27
pt-BR translations for Active Admin
pt-BR:
active_admin:
dashboard: "Painel Administrativo"
dashboard_welcome:
welcome: "Bem vindo ao Active Admin. Esta é a página de painéis padrão."
call_to_action: "Para adicionar seções ao painel, verifique 'app/admin/dashboard.rb'"
view: "Visualizar"
edit: "Editar"
delete: "Remover"
delete_confirmation: "Você tem certeza que deseja remover este item?"
@mateusg
mateusg / carrierwave.pt-BR.yml
Created November 18, 2013 22:46
pt-BR translations for Carrierwave
pt-BR:
errors:
messages:
carrierwave_processing_error: "Não foi possível redimensionar imagem."
carrierwave_integrity_error: "Não é uma imagem."
carrierwave_download_error: "Não foi possível fazer download da imagem."
extension_white_list_error: "O formato %{extension} não é permitido. Formatos suportados: %{allowed_types}"
extension_black_list_error: "O formato %{extension} não é permitido. Formatos proibidos: %{prohibited_types}"
pt-BR:
simple_form:
"yes": 'Sim'
"no": 'Não'
required:
text: 'obrigatório'
mark: '*'
# You can uncomment the line below if you need to overwrite the whole required html.
# When using html, text and mark won't be used.
# html: '<abbr title="required">*</abbr>'
var parseDate = function(date) {
var year = 2000 + parseInt($('.period .filter').text().match(/^.*(\d{2})$/)[1])
date = date
.replace('Fev', 'Feb')
.replace('Abr', 'Apr')
.replace('Mai', 'May')
.replace('Ago', 'Aug')
.replace('Set', 'Sep')
.replace('Out', 'Oct')
@mateusg
mateusg / pt-BR.yml
Last active August 14, 2016 13:42
pt-BR translations for Ruby on Rails
# encoding: UTF-8
# pt-BR translations for Ruby on Rails
"pt-BR":
date:
abbr_day_names:
- Dom
- Seg
- Ter
- Qua
- Qui
@mateusg
mateusg / inflections.rb
Created April 17, 2011 23:03
pt-BR inflections file for Ruby on Rails applications
# encoding: utf-8
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
@mateusg
mateusg / dissite.sh
Created August 3, 2012 21:29
Script for disabling a site, just like a2dissite, from Apache2
#! /bin/bash
# Disables a site, just like a2dissite command, from Apache2.
SITES_AVAILABLE_CONFIG_DIR="/opt/nginx/sites-available";
SITES_ENABLED_CONFIG_DIR="/opt/nginx/sites-enabled";
if [ $1 ]; then
if [ ! -f "${SITES_ENABLED_CONFIG_DIR}/${1}" ]; then
echo "Site ${1} was already disabled!"
elif [ ! -w $SITES_ENABLED_CONFIG_DIR ]; then
@mateusg
mateusg / ensite.sh
Created August 3, 2012 21:22
Script for enabling a site, just like a2ensite, from Apache2.
#! bin/bash
# Enables a site, just like a2ensite command, from Apache2.
SITES_AVAILABLE_CONFIG_DIR="/opt/nginx/sites-available";
SITES_ENABLED_CONFIG_DIR="/opt/nginx/sites-enabled";
if [ $1 ]; then
if [ -f "${SITES_ENABLED_CONFIG_DIR}/${1}" ]; then
echo "Site ${1} was already enabled!";
elif [ ! -w $SITES_ENABLED_CONFIG_DIR ]; then
piper - to configure mouse/logitech
lutris - gaming services client (steam/gog/ubisoft/etc)
flameshot - to screenshot and annotate
handbrake
shotcut