Skip to content

Instantly share code, notes, and snippets.

@jhincapie
jhincapie / Util.KeyCodes.cs
Last active June 1, 2024 01:19
Mapping between Windows API virtual keyboard keyCodes and Unity KeyCode enum
using System.Collections.Generic;
using UnityEngine;
namespace Util
{
public class KeyCodes
{
public const int VK_ABNT_C1 = 0xC1;// Abnt C1
public const int VK_ABNT_C2 = 0xC2;// Abnt C2
public const int VK_ADD = 0x6B;// Numpad +
Best setup for fail2ban for hosts with ssh and apache
Jails (monitored services):
- apache - Blocks failed login attempts use the below jail
- apache-overflows - Blocks the remote host that is trying to request suspicious URLs, use the below jail
- apache-noscript - Block the remote host that is trying to search for scripts on the website to execute, use the below jail
- apache-badbots - Block the remote host that is trying to request malicious bot, use below jail
- http-get-dos - Stops DOS attack from remote host
- ssh - Blocks failed login attempts on the SSH server
@leocomelli
leocomelli / git.md
Last active June 1, 2024 01:10
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@Yousha
Yousha / .gitignore
Last active June 1, 2024 01:08
.gitignore for C/C++ developers.
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@jamornsriwasansak
jamornsriwasansak / cuda-gltexture-interop.cu
Created September 19, 2017 20:27
CUDA and OpenGL texture interop. Quite painful to find a working solution.
//This software contains source code provided by NVIDIA Corporation.
#include "cuda_runtime.h"
#include "cuda_surface_types.h"
#include "surface_functions.h"
// must include in this order :(
#include "GL\glew.h"
#include "cuda_gl_interop.h"
#include "GLFW\glfw3.h"
@allanmac
allanmac / assert_cuda.c
Last active June 1, 2024 01:02
A tiny example of CUDA + OpenGL interop with write-only surfaces and CUDA kernels. Uses GLFW+GLAD.
//
//
//
#include <stdlib.h>
#include <stdio.h>
//
//
//
@indrekj
indrekj / truenas-kubectl.md
Last active June 1, 2024 00:59
How to acccess TrueNAS kubectl remotely?

How to acccess TrueNAS kubectl remotely from your local computer?

DISCLAIMER: This is an unofficial guide. If you mess things up then you may lock yourself out of TrueNAS or even worse, make it unusable. There's also no guarantee that this works in the future.

Through SSH

Currently the easiest way to access kubectl is through ssh and k3s tool. If you have ssh access enabled then you can ssh to your TrueNAS server and use it

2022 Zephyrus G14 Fedora Silverblue Setup

GPU Naming

Most applications in Linux will report the names of the two GPUs as follows.

  • Dimgrey Cavefish is dGPU
  • Yellow Carp is iGPU

Boot Hotkeys

@nyaoouo
nyaoouo / data.csv
Created February 6, 2024 01:42
granblue fantasy relink 因子添加
ID Class Skill1 Skill2
9172d000 3 体力 随机
867effed 3 攻击力 随机
4971e8fb 5 刀上舞 攻击力
02ba37a3 5 穷寇心 攻击力
0bb4ccda 5 先发制人 攻击力
31afd43a 3 先发制人 攻击力
f8cf8814 5 身无长技 攻击力
1cd1d367 5 追击 攻击力
f3220fd0 5 躲避距离 体力