Skip to content

Instantly share code, notes, and snippets.

View trico's full-sized avatar
🚀
Brrrrrr

Eric Ponce trico

🚀
Brrrrrr
  • Barcelona, Spain
View GitHub Profile
ieoooeukiauqodelghkpjfaoeaeea
omyzwjuvioutmgrmreuamqahnhyfa
eñoeuyuvepiamatmziwiapojueoco
atoaañobeekijboozvaifxumaaaju
ihaaoyamwñxdvaoasxigcruqeoicu
okgcrlororvouaedmeceuheqhcsso
aeeioeuzexabavoqimodibaueaeea
npmqjdwqpopwiseñroeoixvdpdgxn
iiññeoabqrgobaepuiolacqewouio
eodovkgifoisoyfuyeogijooiiaia
{
"operations": [
{
"operationAmount": {
"totalWithDiscount": 1,
"totalWithoutDiscount": 1
},
"operationTaxes": [
{
"percentage": 6
require 'csv'
require 'date'
memory_customer_id = 0
memory_points = 0
memory_last_date = nil
memory_location_id = 0
debug = true
CSV.foreach('main.csv').each do |line|
@trico
trico / t.rb
Created December 20, 2018 12:53
+-------------------+ +---------------------+
| Master | | Staging |
| | | |
+-------------------+ +---------------------+
Rama A | |
module CampaignBlock::ReportManager
class ReportIncrementalBudget
attr_accessor :year, :month, :report
def self.default_year
Date.current.year
end
def self.default_month
Date.current.month
end
module CampaignBlock::ReportManager
class ReportIncrementalBudget
def self.default_year
Date.current.year
end
def self.default_month
Date.current.month
end
@trico
trico / formaters.json
Created May 10, 2017 08:27
barcode formater
{
"coupon_id": {
// representer solo tiene format e includes_control
"representer": {
"format": "ean_13", // posible valores 'ean_13', 'code_25_interleaved', 'code_39', 'code_128'
"includes_control": true // posibles valores true/false
},
// formater tiene max_size, prefix y format
@trico
trico / gist:224323bb0abd4bf51ccc
Last active August 29, 2015 14:24
lines count
find . -name '*.txt' -print0 | xargs -0 wc -l
" Specify a directory for plugins (for Neovim: ~/.local/share/nvim/plugged)
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
" On-demand loading
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
#!/bin/bash
tail -n +2 $1 | split -l 10000 - split_
for file in split_*
do
head -n 1 $1 > tmp_file
cat $file >> tmp_file
mv -f tmp_file output/$file.csv
rm $file
done