Skip to content

Instantly share code, notes, and snippets.

View carlosdelfino's full-sized avatar
💭
De volta as origens, com o canal Basicão da Eletrônica

Carlos Delfino carlosdelfino

💭
De volta as origens, com o canal Basicão da Eletrônica
View GitHub Profile
@carlosdelfino
carlosdelfino / after_res_hooks.js
Created July 24, 2018 04:36 — forked from pasupulaphani/after_res_hooks.js
Mongoose connection best practices
var db = mongoose.connect('mongodb://localhost:27017/DB');
// In middleware
app.use(function (req, res, next) {
// action after response
var afterResponse = function() {
logger.info({req: req}, "End request");
// any other clean ups
{
"extends": ["tslint:recommended", "tslint-react", "tslint-config-prettier"],
"linterOptions": {
"exclude": ["node_modules/**/*.ts"]
},
"rules": {
"interface-over-type-literal": false,
"jsx-boolean-value": [true, "never"],
"jsx-no-lambda": false,
"no-console": false,
@carlosdelfino
carlosdelfino / Readme.md
Last active April 13, 2019 16:51 — forked from mheadd/fastagi.js
Node.js script to execute FastAGI application

Launch the node TCP server for FastAGI:

~$ node path/to/fastagi.js

Add a context for FastAGI testing:

[fastagi-test]
@carlosdelfino
carlosdelfino / _README.md
Created January 18, 2020 19:41 — forked from mauriciopoppe/_README.md
MathJax numbered equation preview on Jekyll

MathJax numbered equation preview

No need to click on an a tag to see the equation, just hover on any <a> tag created using \eqref{label} and that's it!

Contents:

@carlosdelfino
carlosdelfino / .zshrc
Created March 19, 2020 14:45 — forked from ThYpHo0n/.zshrc
WSL(2) bash profile helpers
# Windows XSrv config
export $(dbus-launch)
export LIBGL_ALWAYS_INDIRECT=1
export WSL_VERSION=$(wsl.exe -l -v | grep -a '[*]' | sed 's/[^0-9]*//g')
export WSL_HOST=$(tail -1 /etc/resolv.conf | cut -d' ' -f2)
export DISPLAY=$WSL_HOST:0
@carlosdelfino
carlosdelfino / .zshrc
Created March 19, 2020 15:13
[WSL .bashrc snippets] #wsl #snippets
# Windows XSrv config
export $(dbus-launch)
export LIBGL_ALWAYS_INDIRECT=1
export WSL_VERSION=$(wsl.exe -l -v | grep -a '[*]' | sed 's/[^0-9]*//g')
export WSL_HOST=$(tail -1 /etc/resolv.conf | cut -d' ' -f2)
export DISPLAY=$WSL_HOST:0
@carlosdelfino
carlosdelfino / msys2.md
Created July 15, 2020 22:57 — forked from Bluexin/msys2.md
Setting up qtcreator with msys2 on windub
@carlosdelfino
carlosdelfino / QuartusVerilatorError.md
Created July 18, 2020 20:25 — forked from jbush001/QuartusVerilatorError.md
Things that Quartus flags as an error that Verilator does not

(Tested with Quartus 16 and Verilator 3.912)

  • Assign a value to an enumerated type without specifying width:

    typedef enum logic[3:0] {
       FOO = 0,
       BAR = 1
    } my_enum_t;
/*
* Verilog Simulator checker by predefined macro.
*
* Copyright (C) 2017 MURAMATSU Atsushi <[email protected]>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
@carlosdelfino
carlosdelfino / README.md
Created April 3, 2022 13:42 — forked from practicalli-johnny/website.css
Example `styles/website.css` styles that over-ride Gitbook's own styles, specifically for code blocks and image alingment (centred).

Um exemplo de css para usar no GitBook