This file contains hidden or 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
# Generated by Powerlevel10k configuration wizard on 2024-09-22 at 09:55 CEST. | |
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 4242. | |
# Wizard options: nerdfont-v3 + powerline, small icons, unicode, lean, 2 lines, dotted, | |
# full frame, lightest-ornaments, sparse, many icons, fluent, instant_prompt=verbose. | |
# Type `p10k configure` to generate another config. | |
# | |
# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate | |
# your own config based on it. | |
# | |
# Tip: Looking for a nice color? Here's a one-liner to print colormap. |
This file contains hidden or 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
before_script: | |
- apt-get update -qq && apt-get install -y -qq pkg-config cmake | |
- ruby -v | |
- which ruby | |
- gem install dandelion --no-ri --no-rdoc | |
- gem install net-sftp --no-ri --no-rdoc | |
deploy: | |
script: | |
- dandelion deploy $CI_COMMIT_SHA |
This file contains hidden or 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
# fetch all date_pub from active Post already ordered | |
dates = Post.where(active: true).order(date_pub: :desc).pluck(:date_pub) | |
# normalize all data into an array and remove duplication | |
data = dates.map { |date| { year: date.year, month: date.strftime('%B') } }.uniq | |
# group all data by year | |
year_groups = data.group_by { |group| group[:year] } | |
# normalize data to be more organized | |
# group[0] is year, group[1] is a group_by result. something like [{:year=>2018, :month=>"March"}, {:year=>2018, :month=>"January"}] | |
# final data will be similar to [{2018=>["March", "January"]}, {2017=>["April", "May", "December"]}] | |
groups = year_groups.map {|ygroup| { ygroup[0] => ygroup[1].map {|month| month[:month] } } } |
This file contains hidden or 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
task :cleanup => :environment do | |
Review.over_24_hours.destroy_all | |
end | |
# You can call it as rake cleanup on terminal |
This file contains hidden or 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
register_taxonomy( | |
"categorias", | |
array("demonstracao"), | |
array( | |
"public" => true, | |
"show_in_nav_menus" => true, | |
"show_ui" => true, | |
"show_tagcloud" => false, | |
"hierarchical" => true, | |
"label" => "Categorias", |
This file contains hidden or 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
$labels = array( | |
'name' => 'Demonstração', | |
'singular_name' => 'Demonstração', | |
'add_new' => 'Adicionar novo', | |
'add_new_item' => 'Adicionar nova demonstração', | |
'edit_item' => 'Editar Demonstração', | |
'new_item' => 'Nova Demonstração', | |
'all_items' => 'Todas as Demonstrações', | |
'view_item' => 'Ver Demonstração', | |
'search_items' => 'Pesquisar Demonstração', |
This file contains hidden or 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
/* | |
Plugin Name: Demonstração | |
Plugin URI: http://www.gmmcal.com.br | |
Description: Plugin de Demonstração | |
Author: Gustavo Cunha | |
Version: 1.0 | |
Author URI: http://www.gmmcal.com.br | |
*/ |
This file contains hidden or 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
add_action("init", "demonstracaoInit"); | |
function demonstracaoInit() { | |
$d = new Demonstracao(); | |
$d->init(); | |
} |
This file contains hidden or 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
class Demonstracao { | |
function Demonstracao(){ | |
} | |
function init(){ | |
// algum código aqui | |
} | |
} |