Skip to content

Instantly share code, notes, and snippets.

View hostelix's full-sized avatar
🤓
Work for money, Program for love ❤️

Israel Lugo hostelix

🤓
Work for money, Program for love ❤️
View GitHub Profile
@hostelix
hostelix / main.py
Last active October 17, 2019 16:41
DSF - slcsp - Israel lugo
import csv
from collections import defaultdict
SILVER_PLAN = 'Silver'
def read_data_csv(filename):
with open(filename, mode='r') as csv_file:
reader = csv.DictReader(csv_file)
return [row for row in reader]
with table_dates AS (
SELECT generate_series(CURRENT_DATE,
(date_trunc('MONTH', CURRENT_DATE) + INTERVAL '1 MONTH - 1 day')::DATE,
'1 day'::interval)::date AS date_day
) SELECT * FROM table_dates WHERE EXTRACT(ISODOW FROM tabla_dias.fecha) IN (6, 7);

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@hostelix
hostelix / odoorpc.js
Last active November 8, 2019 16:28
OdooRpc make requests to the server odoo by means of rpc (axios)
import axios from 'axios';
class OdooRpc {
constructor() {
this._actions = {
dataset_call: 'web/dataset/call',
dataset_call_kw: 'web/dataset/call_kw',
dataset_search_read: 'web/dataset/search_read',
search_read: 'search_read',
};
@hostelix
hostelix / keys.go
Created August 5, 2017 04:42 — forked from sdorra/keys.go
Golang RSA Key Generation
/*
* Genarate rsa keys.
*/
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
@hostelix
hostelix / bancos_venezuela_odoo.xml
Last active January 15, 2024 15:14
Bancos de Venezuela para Odoo
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- res.bank of Venezuela -->
<record model="res.bank" id="0001">
<field name="name">Banco Central de Venezuela</field>
<field name='bic'>BCV</field>
<field name='active'>1</field>
<field name='street'>Av. Urdaneta esq. Las Carmelitas</field>
<field name='street2'>Carmelitas 1010</field>
@hostelix
hostelix / bancos_venezuela.json
Last active July 22, 2025 05:46
Json de lista de bancos en venezuela
[
{
"codigo": "0102",
"nombre": "Banco de Venezuela, S.A. Banco Universal",
"rif": "G200099976"
},
{
"codigo": "0104",
"nombre": "Venezolano de Crédito, S.A. Banco Universal",
"rif": "J000029709"
@hostelix
hostelix / highchart-lang-es.js
Created November 15, 2016 19:51
highchart lang es
var lang_es = {
months:[
"Enero",
"Febrero",
"Marzo",
"Abril",
"Mayo",
"Junio",
"Julio",
"Agosto",
@hostelix
hostelix / todas_semanas_anio.sql
Created November 7, 2016 00:04
Consulta sql para obtener todas las semanas del año con la fecha de inicio y fin de cada una
select
to_char(extract(week from (f1 + (i || ' weeks')::interval)),'09')::integer as semana,
(f1 + (i || ' weeks')::interval)::date as fecha_inicio_semana,
(f2 + (i || ' weeks')::interval)::date as fecha_fin_semana
from (
select f1, f1 + 6 as f2 from (
select (current_date -(extract(week from current_date) - 1 || 'weeks')::interval)::date - (extract(dow from current_date)::integer - 1) as f1) as foo1
) as foo2, generate_series(0, 52) as i
where extract(year from (f1 + (i || ' weeks')::interval)) = extract(year from current_date)
[
{
"nombre":"DEPENDENCIAS FEDERALES",
"cod_estado_asap":25,
"hc-key":"ve-dp",
"id":45,
"woe-id":"2347700"
},
{
"nombre":"NUEVA ESPARTA",