Skip to content

Instantly share code, notes, and snippets.

View Mazuh's full-sized avatar
👨‍💻
Code Summoner

Marcell Guilherme Costa da Silva Mazuh

👨‍💻
Code Summoner
View GitHub Profile
@abelcallejo
abelcallejo / README.md
Last active July 14, 2024 06:44
Creating bootable Linux USB using Mac

Creating bootable Linux USB using Mac

mac

CentOS, Ubuntu, Slackware, etc. Whatever Linux-based OS it is, you can create a bootable USB for it by using a Mac.

1. Prepare the .iso file

Download it, copy it, whatever it takes to prepare that Linux-based OS .iso file

2. Convert the .iso file into a .img.dmg

@elmasantos
elmasantos / codeofconduct.md
Last active March 8, 2019 16:53
Natal Tech Conference's Code of Conduct

Code of Conduct

Natal Tech Conference aims at being a harassment-free event, regardless of attendees physical appearance, disability, ethnicity, gender, age, gender identity or expression, sexual identity or orientation, nationality, experience level, body size, race or religion.

Every person at the conference, including staff and sponsors, must be in agreement with this the code of conduct. In this way, we hope to guarantee a safe, friendly and inclusive environment with everybody's contribution

Inappropriate and unacceptable behavior examples:

  • Any type of harassment (insisting, persecuting or coerce another person into involuntary behavior)
  • Any type of discrimination (pull apart, insult or humiliate someone promoting their exclusion by any particular attribute)
  • Public humiliation (subjugating, pulling down, ridiculing, or publicly vexing anothers)
@weikangchia
weikangchia / dialogflow_v2.js
Last active July 20, 2022 11:06
Generate DialogFlow V2 Access Token
const googleAuth = require('google-oauth-jwt');
function generateAccessToken() {
 return new Promise((resolve) => {
  googleAuth.authenticate(
   {
    email: <client_email>,
    key: <private_key>,
    scopes: 'https://www.googleapis.com/auth/cloud-platform',
   },
@victor-torres
victor-torres / .ssh_config
Created April 24, 2018 19:23
Remote pbcopy and pbpaste
Host <your host ip>
User <your host user>
Port <your host port>
@nonamenix
nonamenix / hug_swagger.py
Last active April 5, 2019 19:37
Swagger specification for hug. Ugly draft.
import inspect
import collections
from collections import OrderedDict
import hug
import logging
from apispec import APISpec
from apispec.ext.marshmallow.swagger import field2parameter
from copy import copy
@fmasanori
fmasanori / super salários USP.py
Created July 4, 2017 23:27
Super Salários USP
"""
Autores:
Tiago Henrique da Cruz Pereira
João Felipe de Moraes Borges
"""
import threading
import time
import os
from urllib.request import urlopen
@codediodeio
codediodeio / database.rules.json
Last active June 22, 2024 07:03
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@avsthiago
avsthiago / bar_primeiro_bimestre.py
Last active September 15, 2020 17:24
Controle bar threads
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 24 10:15:44 2017
@author: avsthiago, asales, rtibola
"""
"""
Problema Original
http://www.inf.pucrs.br/~emoreno/undergraduate/CC/sisop/sem12.1/material/trabalhos/TP2.pdf
@fokusferit
fokusferit / enzyme_render_diffs.md
Last active June 18, 2024 11:27
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@zcaceres
zcaceres / Include-in-Sequelize.md
Last active July 13, 2024 13:46
using Include in sequelize

'Include' in Sequelize: The One Confusing Query That You Should Memorize

When querying your database in Sequelize, you'll often want data associated with a particular model which isn't in the model's table directly. This data is usually typically associated through join tables (e.g. a 'hasMany' or 'belongsToMany' association), or a foreign key (e.g. a 'hasOne' or 'belongsTo' association).

When you query, you'll receive just the rows you've looked for. With eager loading, you'll also get any associated data. For some reason, I can never remember the proper way to do eager loading when writing my Sequelize queries. I've seen others struggle with the same thing.

Eager loading is confusing because the 'include' that is uses has unfamiliar fields is set in an array rather than just an object.

So let's go through the one query that's worth memorizing to handle your eager loading.

The Basic Query