Skip to content

Instantly share code, notes, and snippets.

View categulario's full-sized avatar
🚲
Always remote

Abraham Toriz Cruz categulario

🚲
Always remote
View GitHub Profile
@categulario
categulario / collaborators.grahpql
Created November 1, 2018 17:47
People you have collaborated with; Personas con las que has colaborado
# Type queries into this side of the screen, and you will
# see intelligent typeaheads aware of the current GraphQL type schema,
# live syntax, and validation errors highlighted within the text.
# We'll get you started with a simple query showing your username!
query {
viewer {
repositories(first:100, ownerAffiliations:[OWNER]) {
nodes {
name
@categulario
categulario / stops.geojson
Created October 17, 2018 03:22
Paradas de xalapa
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@categulario
categulario / sum.py
Created July 21, 2018 01:02
Lee información de facturas en formato cfdi 3.3 y suma los impuestos
from xml.dom.minidom import parse
import os
import sys
def main():
if len(sys.argv) < 2:
exit('Usage: sum.py folder-with-xmls')
dirname = sys.argv[1]
#!/bin/bash
res=`python -c "
a=1
a+=1
print(a)
"`
echo $res
set encoding=utf-8
scriptencoding utf-8
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'vim-scripts/Align'
data = [
"44013001",
"44042099",
"44071001",
"44071002",
"44072101",
"44072102",
"44072199",
"44072201",
"44072299",
@categulario
categulario / fix.sh
Last active May 19, 2018 15:33
Convierte pesos a dólares y de regreso desde la consola
# Usage: usdtomxn 1
# Output: 19.9319
# Usage: mxntousd 19.9319
# Output: 1.0
#
# You'll need the jq command for this to run
# Vas a necesitar el comando jq para que esto jale
#
# https://stedolan.github.io/jq/
@categulario
categulario / state.py
Created May 16, 2018 14:20
Representación del estado de cacahuate
{
'_type': 'execution',
'id': '29uiferi',
'process_id': 'some.2018-05-16.xml',
'state': {
'_type': ':sorted_map',
'items': {
'node1_id': {
'_type': 'node',
'id': 'node1_id',
def login_required(view):
@wraps(view)
def decorated(*args, **kwargs):
auth = request.authorization
if auth is None:
abort(401)
user = User.get_by('api_key', auth.password)
if user is not None:
@categulario
categulario / postman.desktop
Created July 23, 2017 14:26
Postman desktop file
[Desktop Entry]
Categories=Network;Http Testing
Encoding=UTF-8
Name=Postman
GenericName=Http Requester
Comment=Http Requester
TryExec=/home/abraham/.local/opt/Postman-linux-x64-5.0.2/Postman/Postman
Exec=/home/abraham/.local/opt/Postman-linux-x64-5.0.2/Postman/Postman %u
Icon=/home/abraham/.local/opt/Postman-linux-x64-5.0.2/Postman/resources/app/assets/icon.png
Terminal=false