Skip to content

Instantly share code, notes, and snippets.

View arthurmco's full-sized avatar
💭
..........

Arthur Mendes arthurmco

💭
..........
View GitHub Profile
@rponte
rponte / using-uuid-as-pk.md
Last active June 24, 2024 20:10
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

from ast import (
NodeTransformer,
arguments,
arg,
Lambda,
parse,
In,
Call,
Expression,
fix_missing_locations,
@jasonphillips
jasonphillips / graphql_tools.py
Last active April 7, 2020 12:38
python graphql-tools imitation
import graphql
# build_executable schema
#
# accepts schema_definition (string) and resolvers (object) in style of graphql-tools
# returns a schema ready for execution
def build_executable_schema(schema_definition, resolvers):
ast = graphql.parse(schema_definition)
schema = graphql.build_ast_schema(ast)
@arthurmco
arthurmco / gemidao-do-zap.el
Last active August 14, 2017 04:12
gemidão do zap, agora no Emacs!
(defun make-gemidao ()
"Run the gemidao"
(condition-case nil
(progn
(make-process :name "gemidao" :command '("firefox" "https://www.youtube.com/watch?v=gP0ihSrIDRo"))
(make-process :name "gemidao" :command '("chromium" "https://www.youtube.com/watch?v=gP0ihSrIDRo"))
(make-process :name "gemidao" :command '("iexplore" "https://www.youtube.com/watch?v=gP0ihSrIDRo"))
(make-process :name "gemidao" :command '("safari" "https://www.youtube.com/watch?v=gP0ihSrIDRo")))
(error nil)))
@cryzed
cryzed / fix-infinality.md
Last active June 24, 2024 02:24
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@vinicius73
vinicius73 / post.md
Created November 22, 2016 12:26
["LÓGICA DE PROGRAMAÇÃO" É BOBAGEM, e explicarei porquê.]

#["LÓGICA DE PROGRAMAÇÃO" É BOBAGEM, e explicarei porquê.]

Se preparem que o texto é longo.

Várias vezes chegam novatos aqui perguntando como começar, e a galera diz "estuda lógica primeiro, depois vai pra linguagem X". Vivo dizendo que é bobagem. Ontem, em particular, falei isso, e vieram várias pessoas por inbox me perguntar porquê (e uma pra me xingar, achando que falei por arrogância).

Pra facilitar, eu vou escrever uma boa explicação de porquê "lógica de programação" é furada, doa a quem doer, e postar na APDA e no fórum da EnergyLabs (para futuras referências, porque esse assunto vai voltar, ctz).

@CMCDragonkai
CMCDragonkai / fold_ideas.md
Last active June 11, 2024 02:53
Haskell: Foldl vs Foldr

Foldl vs Foldr

I like to call foldr as "fold from the right", while foldl is "fold from the left".