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
@ambalabanov
ambalabanov / .bashrc
Last active January 27, 2025 18:56
metasploit docker-compose
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
@niw
niw / README.en.md
Last active August 28, 2025 18:24
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

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
@citruz
citruz / QEMU_ON_M1.md
Last active May 3, 2025 17:10
Create Ubuntu and Windows VMs with QEMU on Apple Silicon

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

@justinhartman
justinhartman / 01_nginx-reload-post-hook.sh
Last active September 12, 2025 07:56
Let's Encrypt Certbot post hook command for Nginx which checks the updated configuration files and reloads the server if everything validates.
#!/usr/bin/env bash
#
# Certbot Nginx Reload
#
# Let's Encrypt Certbot post hook command for Nginx which checks the updated
# configuration files and reloads the server if everything validates.
#
# Author : Justin Hartman <[email protected]>
# Version : 1.0.1
# License : MIT <https://opensource.org/licenses/MIT>
@laurentbel
laurentbel / !Loki nginx basic authentication.md
Last active January 8, 2025 22:58
Loki Nginx basic authentication

Loki secured with basic authentication using Nginx

Basic setup to protect loki with basic authentication using Nginx

@Pasi-D
Pasi-D / helpers\accessEnv.ts
Last active March 23, 2024 20:23
React Native env accessor and version name displayer
/*****************************************************************************************
* Accesses a variable inside of .env file and cache for later usage; throws an error if its not found.
*
* caching the values to improve the performance.
*
* Usage:
*
* import accessEnv from "helpers/accessEnv";
*
* const redirectionHost = accessEnv("MAJOR_VERSION", 1);
@toricls
toricls / lima-on-m1-mac-installation-guide.md
Last active November 2, 2025 18:35
Using Lima to run containers with containerd and nerdctl (without Docker Desktop) on M1 Macs

Lima (Linux virtual machines, on macOS) installation guide for M1 Mac.

Sep. 27th 2021 UPDATED

Now we can install patched version of QEMU via Homebrew (thank you everyone for the info!). Here is the updated instruction with it:

Used M1 Mac mini 2020 with macOS Big Sur Version 11.6.

1. Install QEMU & Lima

@Norod
Norod / README.MD
Created December 14, 2023 09:15
Detect and Crop Head in Image

Detect and Crop Head in Image

This Python script leverages the OpenCV library for face detection and the PIL (Pillow) library for image processing to detect and crop a human head in an image. The detect_and_crop_head function takes an input image file, detects the face using a pre-trained Haar Cascade classifier, and crops the image to include the entire head with a 1:1 aspect ratio. The cropping is achieved by specifying a factor that determines the size of the cropped region around the detected face. Adjust the factor parameter based on the specific requirements of your images.

Usage:

input_image_path = "path/to/your/input/image.jpg"
output_image_path = "path/to/save/cropped/head.jpg"
detect_and_crop_head(input_image_path, output_image_path, factor=1.5)