Skip to content

Instantly share code, notes, and snippets.

View mtrsk's full-sized avatar
🛠️
Tinkering

Marcos Benevides mtrsk

🛠️
Tinkering
View GitHub Profile
@swlaschin
swlaschin / booklist.md
Last active May 2, 2024 11:29
Some recommended books for improving as a software developer

Some recommended books for improving as a software developer

Most software books are too language specific and go out of date too quickly. What I find has stayed with me are books about bigger concepts, such as systems thinking and complexity, and also so-called "soft skills" such as management and psychology.

User experience

These are all really about developing empathy for other people :)

  • "The Design of Everyday Things" by Donald Norman
@adisbladis
adisbladis / podman-shell.nix
Last active April 29, 2024 14:50
Use podman within a nix-shell
{ pkgs ? import <nixpkgs> {} }:
let
# To use this shell.nix on NixOS your user needs to be configured as such:
# users.extraUsers.adisbladis = {
# subUidRanges = [{ startUid = 100000; count = 65536; }];
# subGidRanges = [{ startGid = 100000; count = 65536; }];
# };
@Ronald-TR
Ronald-TR / pipe_in_python.py
Last active November 20, 2019 12:06
Simple implementation of pipe operator into your functions: https://code.sololearn.com/ca4QB7ZEM91L/#py
"""Cause the fstrings notation into the example 'congrats' functions,
the examples only works in python 3.8.
"""
from functools import partial
class Pipe:
def __init__(self, function):
self.function = function
@florimondmanca
florimondmanca / asgi-packages.md
Last active December 4, 2023 15:52
ASGI Packages

A list of ASGI-related Python packages I maintain:

@misuzu
misuzu / oracle-cloud-nixos-install.md
Last active December 10, 2023 17:53
Install NixOS on Oracle Cloud over Ubuntu 18.04

Install NixOS on Oracle Cloud over Ubuntu 18.04 (make sure to use Ubuntu 18.04 or this may not work)

# install useful tools
sudo apt-get update
sudo apt-get install --no-install-recommends -y nano mc git

# prepare /boot
sudo umount /boot/efi
sudo mv /boot /boot.bak
@MattPD
MattPD / analysis.draft.md
Last active April 24, 2024 14:53
Program Analysis Resources (WIP draft)
@M0r13n
M0r13n / README.md
Last active January 30, 2024 19:35
Logging with Loguru in Flask

This is a simple example of how to use loguru in your flask application

Just create a new InterceptHandler and add it to your app. Different settings should be configured in your config file, so that it is easy to change settings.

Logging is then as easy as:

from loguru import logger

logger.info("I am logging from loguru!")

@AndersonTorres
AndersonTorres / nix-development-template-file.org
Last active September 27, 2021 21:01
A project workflow for Nixpkgs/NixOS

Standard project structure

This is a project structure I’ve found useful. Looking for any thoughts/comments/feedback. Roughly, I found a tension between the style nixpkgs expects and the style conducive to development, so I extracted the common portion into a derivation.nix which is used by the remaining .nix files. This setup allows me to use nix build, nix-shell, overlays, Hydra, alternate packaging schemes, cross-compiling, etc.

@Denommus
Denommus / azureoverlay.nix
Created March 7, 2019 20:15
This file should be in `~/.config/nixpkgs/overlays`. This will fix nixopsUnstable
self: super: rec {
nixopsUnstable = super.nixopsUnstable.overrideAttrs (oldAttrs: {
preConfigure = ''
find . -iname azure_common.py -exec sed -i 's/NetworkResourceProviderClient/NetworkManagementClient/' {} \;
find . -iname azure_vm.py -exec sed -i 's/from azure.mgmt.network import PublicIpAddress, NetworkInterface, NetworkInterfaceIpConfiguration, IpAllocationMethod, PublicIpAddressDnsSettings, ResourceId/from azure.mgmt.network.models import PublicIPAddress, NetworkInterface, NetworkInterfaceIPConfiguration, IPAllocationMethod, PublicIPAddressDnsSettings\nfrom azure.mgmt.batchai.models import ResourceId/' {} \;
find . -iname azure_availability_set.py -exec sed -i 's/from azure.mgmt.compute import AvailabilitySet/from azure.mgmt.compute.models import AvailabilitySet/' {} \;
find . -iname azure_resource_group.py -exec sed -i 's/from azure.mgmt.resource import ResourceGroup/from azure.mgmt.resource.resources.models import ResourceGroup/' {} \;
find . -iname azure_storage.py
@aabs
aabs / shell.nix
Created February 6, 2019 21:33
nix shell for python dev
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
let
inherit (lib) optional optionals;
proxy = "<your proxy if you need one>";
in
mkShell {