Skip to content

Instantly share code, notes, and snippets.

@gsopu8065
gsopu8065 / hog_dlib.py
Created July 17, 2020 17:14
HOG_DLIB
import dlib
import cv2
#step1: read the image
image = cv2.imread("./testimages/test1.jpg")
#step2: converts to gray image
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
#step3: get HOG face detector and faces
@Valeour
Valeour / GradientHDRAttribute.cs
Last active March 29, 2024 08:14
Unity C# Attribute to enable HDR Gradient fields in the Inspector.
/**
* GradientHDRAttribute created by Chance Millar at Two Tails Games on 2018/05/08
* Use freely. That's a license, right?
*
* Attach attribute like so:
*
* [GradientHDR]
* public Gradient _HDRGradient;
*
* Make sure this is placed in a non-Editor folder inside Assets.
@danielcshn
danielcshn / fix-duplicate-class-android-studio.md
Created April 16, 2023 04:08
Fix Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-* Android Studio | 2022.2.1

📜 Info:

  • Android Studio Flamingo | 2022.2.1
  • Build #AI-222.4459.24.2221.9862592, built on March 31, 2023
  • Gradle JDK: jbr-17 (JetBrains Runtime version 17.0.6)
  • Windows 11 (version 10.0.22000.1817)

🐛 Bug/Error log:

@padeoe
padeoe / README_hfd.md
Last active March 29, 2024 08:12
CLI-Tool for download Huggingface models and datasets with aria2/wget+git

🤗Huggingface Model Downloader

Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, this command-line tool smartly utilizes wget or aria2 for LFS files and git clone for the rest.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
  • 🚀 Multi-threaded Download: Utilize multiple threads to speed up the download process.
  • 🚫 File Exclusion: Use --exclude or --include to skip or specify files, save time for models with duplicate formats (e.g., *.bin or *.safetensors).
  • 🔐 Auth Support: For gated models that require Huggingface login, use --hf_username and --hf_token to authenticate.
  • 🪞 Mirror Site Support: Set up with HF_ENDPOINT environment variable.
@elasticdog
elasticdog / vault-cp
Created July 27, 2018 18:32
A script to copy Vault secrets from one path to another
#!/usr/bin/env bash
# ensure we were given two command line arguments
if [[ $# -ne 2 ]]; then
echo 'usage: vault-cp SOURCE DEST' >&2
exit 1
fi
source=$1
dest=$2
@gmh5225
gmh5225 / createprocess.cpp
Created February 17, 2024 10:09 — forked from senko37/createprocess.cpp
Create process from KernelMode via APC
typedef struct _STARTUPINFOW {
UINT32 cb;
LPWSTR lpReserved;
LPWSTR lpDesktop;
LPWSTR lpTitle;
UINT32 dwX;
UINT32 dwY;
UINT32 dwXSize;
UINT32 dwYSize;
UINT32 dwXCountChars;
@jeyaramashok
jeyaramashok / ocp-k8s-version.md
Last active March 29, 2024 08:07
openshift kubernetes version mapping
Red Hat OpenShift version Kubernetes version
4.15 1.28
4.14 1.27
4.13 1.26
4.12 1.25
4.11 1.24
4.10 1.23
4.9 1.22
4.8 1.21
@zouppen
zouppen / README.md
Last active March 29, 2024 08:06
Block incoming traffic from Tor exit nodes on Linux + ipset

Block Tor exit nodes with Linux and ipset

This gist blocks incoming traffic from Tor exit nodes. You can also use it to MARK or redirect the incoming traffic, depending of your needs.

This guide is for IPv4 only, feel free to contribute IPv6 support if you have it.

Installing

@jlis
jlis / .gitlab-ci.yml
Created May 15, 2018 13:16
AWS ECS and ECR deployment via Docker and Gitlab CI
image: docker:latest
variables:
REPOSITORY_URL: <AWS ACCOUNT ID>.dkr.ecr.eu-central-1.amazonaws.com/<ECS REPOSITORY NAME>
REGION: eu-central-1
TASK_DEFINTION_NAME: <TASK DEFINITION NAME>
CLUSTER_NAME: <CLUSTER NAME>
SERVICE_NAME: <SERVICE NAME>
services:
@0xdevalias
0xdevalias / reverse-engineering-webpack-apps.md
Last active March 29, 2024 08:06
Some notes and techniques for reverse engineering Webpack (and a little bit about React/Vue) apps