Skip to content

Instantly share code, notes, and snippets.

View gabrielgodoy-zz's full-sized avatar

Gabriel Godoy gabrielgodoy-zz

View GitHub Profile
@viniciusdaniel
viniciusdaniel / d3js.pt-br.js
Created October 29, 2014 23:01
D3.js localize pt-BR for time and number formatting
/**
* Configuração de localização em Português do Brasil(PT-BR) para o D3.js realizar formatação tempo e números
* Mais detalhes conferir a documentação: https://github.com/mbostock/d3/wiki/Time-Formatting
*/
var localized = d3.locale({
"decimal": ",",
"thousands": ".",
"grouping": [3],
"currency": ["R$", ""],
@kevinwhoffman
kevinwhoffman / loop-custom.php
Last active July 17, 2024 14:47
WordPress - Custom Post Type Loop
<?php
$loop = new WP_Query( array(
'post_type' => 'Property',
'posts_per_page' => -1
)
);
?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
@MartinSeeler
MartinSeeler / README.md
Last active July 3, 2023 21:36
IntelliJ's "Expand Selection" in Sublime Text

IntelliJ's "Expand Selection" feature in Sublime Text

  1. Install the sublime-expand-region plugin in Sublime Text via Package Control.
  2. Edit Preferences -> Key Bindings - User and add the following to it:
{
  "keys": [
    "alt+up"
  ],
 "command": "expand_region"
@chrtze
chrtze / chart.js
Created November 23, 2015 20:00
Line Chart Example
var Chart = (function(window,d3) {
var svg, data, x, y, xAxis, yAxis, dim, chartWrapper, line, path, margin = {}, width, height, locator;
var breakPoint = 768;
d3.csv('data.csv', init); //load data, then initialize chart
//called once the data is loaded
function init(csv) {
#!/bin/sh
#
# Brew packages that I use alot.
#
brew install wget
brew install node
brew install imagemagick
#
# Some cask packages that I like.
#
@sam-artuso
sam-artuso / setting-up-babel-nodemon.md
Last active March 30, 2025 10:24
Setting up Babel and nodemon

Setting up Babel and nodemon

Inital set-up

Set up project:

mkdir project
cd project
npm init -y
@patrickporto
patrickporto / desafio-dinheiro.md
Last active March 31, 2019 00:33
Este é um desafio adequado para Desenvolvedor Back-End Júnior da área de Banking.

Manipulação de Dinheiro

O Sistema Financeiro precisa representar valores monetários. A idéia básica é ter uma estrutura de dados que permita realizar operações financeiras com dinheiro dentro de uma mesma moeda. Essas operações financeiras precisam ser seguras e devem interromper a execução do programa em caso de erros críticos.

Sobre as operações financeiras que serão realizadas no sistema, é correto afirmar que os valores monetários devem suportar as seguintes operaçoes:

  • O sistema realizará split de transações financeiras, então deve ser possível realizar a operação de rateio de valores monetários entre diferentes indivíduos.

  • O sistema permite realizar câmbio então os valores monetários possuem uma operação para conversão de moeda.