Skip to content

Instantly share code, notes, and snippets.

View mod64bits's full-sized avatar

Marcio Oliveia de deus mod64bits

View GitHub Profile
@luizomf
luizomf / ambiente-dev-ubuntu.sh
Last active September 29, 2025 00:02
Ambiente de desenvolvimento Python no Ubuntu - Com VS Code, Google Chrome, ZSH, Oh-my-zsh, zsh-syntax-highlighting, zsh-autosuggestions e spaceship prompt.
#!/bin/bash
# Executar comandos a seguir para atualizar os pacotes
sudo apt update -y
sudo apt upgrade -y
# Só o Python
sudo apt install python3.10-full python3.10-dev -y
# Instalar pacotes a seguir
@MikaelSantilio
MikaelSantilio / filteredlistview.py
Last active October 19, 2024 17:10
Filtering and Pagination with Django Class-based View
# Font: https://www.caktusgroup.com/blog/2018/10/18/filtering-and-pagination-django/
class FilteredListView(ListView):
filterset_class = None
def get_queryset(self):
# Get the queryset however you usually would. For example:
queryset = super().get_queryset()
# Then use the query parameters and the queryset to
# instantiate a filterset and save it as an attribute
@diego3g
diego3g / settings.json
Last active October 11, 2025 23:50
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 16,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [
80,
120
],
import json
import requests
BASE_URL = 'https://192.168.6.35/cgi-bin'
API = {
'apply': BASE_URL+'/api/v3/system/apply',
'login': BASE_URL+'/api/v3/system/login',
'service_led': BASE_URL+'/api/v3/service/leds',
'service_ssh': BASE_URL+'/api/v3/service/ssh',
@douglasmiranda
douglasmiranda / forms.py
Created July 17, 2012 17:46
Implementando form de filtro numa ListView (Resposta para um tópico na Django Brasil)
# https://groups.google.com/forum/?fromgroups#!topic/django-brasil/d6gV1V9qrgU
from django.forms import ModelForm
from minha_app.models import MeuModel
class MeuForm(ModelForm):
class Meta:
model = MeuModel