Skip to content

Instantly share code, notes, and snippets.

View DarcJC's full-sized avatar

Darc Z. DarcJC

View GitHub Profile
@chillpert
chillpert / vim-unreal.md
Last active February 23, 2025 18:53
Debugging and autocompletion for Unreal Engine 4 and 5 projects in (Neo)vim

Debugging and autocompletion for Unreal Engine 4 and 5 projects in (Neo)Vim

+++ Updated for UE 5.1 (see bottom)

Autocompletion

For autocompletion there are two options:

  1. coc (Vim, Neovim)
  2. LSP (Neovim only)
@DarcJC
DarcJC / loader.py
Last active August 2, 2021 11:49
Casbin Policy Auto Reloader
"""
Current version(1.1.7) of AsyncCasbin doesn't support any async orm adapter,
it means adapter such as casbin_tortoise_adapter wouldn't work with the SyncedEnforcer class
(you will recieve "... was never awaited" if you use it ).
So we could just use common Enforcer, and reload the policy periodically(the strategy SyncedEnforcer choose).
"""
import casbin
import casbin_tortoise_adapter
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 21, 2025 16:19
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@BoGnY
BoGnY / README.md
Last active March 22, 2025 04:13
[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

This is a step-by-step guide on how to enable auto-signing Git commits with GPG for every applications that don't support it natively (eg. GitHub Desktop, Eclipse, Git Tower, ...)

Requirements

  • Install GPG4Win: this software is a bundle with latest version of GnuPG v2, Kleopatra v3 certificate manager, GNU Privacy Assistant (GPA) v0.9 which is a GUI that uses GTK+, GpgOL and GpgEX that are respectively an extension for MS Outlook and an extension for Windows Explorer shell
  • Install Git for Windows: so you can have a *nix based shell, this software is a bundle with latest version of Git which use MINGW environment, a Git bash shell, a Git GUI and an extension for Windows Explorer shell (Make sure your local version of Git is at least 2.0, otherwise Git don't have support for automatically sign your commits)
  • Verify
@jonvaldes
jonvaldes / test.rs
Last active February 16, 2021 09:08
Testing how to generate a tga image with Rust
use std::io;
use std::fs::File;
use std::io::Write;
use std::mem;
use std::slice;
#[derive(Clone)]
struct Color(u8, u8, u8);
struct Image {
@leira
leira / gist:9e3db94c3592dbb0842f
Created June 12, 2015 23:42
disable signature check on Mac
sudo defaults write /Library/Preferences/com.apple.AOSKit ClientValidationEnabled -bool NO
sudo ditto /usr/libexec/taskgated_debug /usr/libexec/taskgated
sudo defaults write /Library/Preferences/com.apple.security.coderequirements Entitlements -string always
sudo defaults write /Library/Preferences/com.apple.security.coderequirements AllowUnsafeDynamicLinking -bool YES
sudo killall taskgated syncdefaultsd
#include <cstdint>
#include <algorithm>
#include <iostream>
#include <limits>
namespace anh {
namespace detail {
/// @TODO Remove quotes from around constexpr when visual studio begins
/// supporting that c++0x feature.