Skip to content

Instantly share code, notes, and snippets.

View luscas's full-sized avatar
πŸ“
home office

Lucas luscas

πŸ“
home office
View GitHub Profile
@tasdikrahman
tasdikrahman / python_tests_dir_structure.md
Last active February 10, 2025 22:15
Typical Directory structure for python tests

A Typical directory structure for running tests using unittest

Ref : stackoverflow

The best solution in my opinion is to use the unittest [command line interface][1] which will add the directory to the sys.path so you don't have to (done in the TestLoader class).

For example for a directory structure like this:

new_project

β”œβ”€β”€ antigravity.py

@parmentf
parmentf / GitCommitEmoji.md
Last active April 16, 2025 15:27
Git Commit message Emoji

Inspired by dannyfritz/commit-message-emoji

See also gitmoji.

Commit type Emoji
Initial commit πŸŽ‰ :tada:
Version tag πŸ”– :bookmark:
New feature ✨ :sparkles:
Bugfix πŸ› :bug:
@joshnuss
joshnuss / app.js
Last active February 18, 2025 15:49
Express.js role-based permissions middleware
// the main app file
import express from "express";
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db)
import authenticate from "./authentication"; // middleware for doing authentication
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request
const app = express(),
api = express.Router();
// first middleware will setup db connection
@rxaviers
rxaviers / gist:7360908
Last active April 17, 2025 04:46
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@ricardobarantini
ricardobarantini / estados.php
Last active April 9, 2025 22:54
Array com nome e siglas de estados Brasileiros para select do Codeigniter
$estadosBrasileiros = array(
'AC'=>'Acre',
'AL'=>'Alagoas',
'AP'=>'AmapΓ‘',
'AM'=>'Amazonas',
'BA'=>'Bahia',
'CE'=>'CearΓ‘',
'DF'=>'Distrito Federal',
'ES'=>'EspΓ­rito Santo',
'GO'=>'GoiΓ‘s',