Skip to content

Instantly share code, notes, and snippets.

View dan-developer's full-sized avatar
🎯
Focusing

Anderson Scouto da Silva (Dan) dan-developer

🎯
Focusing
View GitHub Profile
@dan-developer
dan-developer / remove_duplicates.py
Created May 19, 2023 13:40 — forked from victorono/remove_duplicates.py
Django - remove duplicate objects where there is more than one field to compare
View remove_duplicates.py
from django.db.models import Count, Max
unique_fields = ['field_1', 'field_2']
duplicates = (
MyModel.objects.values(*unique_fields)
.order_by()
.annotate(max_id=Max('id'), count_id=Count('id'))
.filter(count_id__gt=1)
)
@dan-developer
dan-developer / QEMU_ON_M1.md
Created January 1, 2022 18:58 — forked from citruz/QEMU_ON_M1.md
Create Ubuntu and Windows VMs with QEMU on Apple Silicon
View QEMU_ON_M1.md

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

@dan-developer
dan-developer / README.en.md
Created January 1, 2022 16:02 — forked from niw/README.en.md
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac
View README.en.md

How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!

NOTE: that this is current, 10/1/2021 state.

Running Windows 10 on ARM

  1. Install Xcode from App Store or install Command Line Tools on your Mac
View gist:a7bf06270da937c8d2765fa96a5a818c
deb http://deb.debian.org/debian/ bullseye main
deb-src http://deb.debian.org/debian/ bullseye main
deb http://security.debian.org/debian-security bullseye-security main contrib
deb-src http://security.debian.org/debian-security bullseye-security main contrib
deb http://deb.debian.org/debian/ bullseye-updates main contrib
deb-src http://deb.debian.org/debian/ bullseye-updates main contrib
deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free
deb http://deb.debian.org/debian-security bullseye/updates main contrib non-free