Skip to content

Instantly share code, notes, and snippets.

View MyelinsheathXD's full-sized avatar
🎯
Focusing

Sunnatulla Esanov MyelinsheathXD

🎯
Focusing
View GitHub Profile
@dawsontoth
dawsontoth / LowLevelMouseHooks.cs
Created February 11, 2011 20:42
Adds some low level mouse hooks to a WPF app, turning any left click into a double click.
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace Dawson.Accessibility
{
/// <summary>
/// Interaction logic for MouseHooker.xaml
/// Derived from http://blogs.msdn.com/b/toub/archive/2006/05/03/589468.aspx
/// </summary>
@sebclaeys
sebclaeys / example.cpp
Created September 19, 2011 21:19
Light weight C++ XML writer
#include "xml_writer.hpp"
#include <iostream>
int main()
{
Writer writer(std::cout);
writer.openElt("Movies");
writer.openElt("Goldeneye").attr("date", "1998").content("This is a James Bond movie").endElt();
writer.openElt("Leon").attr("director", "Luc Besson");
writer.openElt("Actor").attr("role", "Leon").attr("name", "Jean Reno").endAll();
@Stasonix
Stasonix / Form1.cs
Created July 26, 2012 08:52
GLOBAL HOOK example C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Text.RegularExpressions;
using System.IO;
@Rod-Persky
Rod-Persky / CMakeLists.txt
Last active January 31, 2024 12:57
Example cmake for windows including auto copy dll
# _______ __ __ _______ ______ _______ _______ _______ ______ #
#| || | | || || | | _ || || || | #
#| _ || | | ||_ _|| _ || |_| ||_ _|| ___|| _ |#
#| | | || |_| | | | | | | || | | | | |___ | | | |#
#| |_| || | | | | |_| || | | | | ___|| |_| |#
#| || | | | | || _ | | | | |___ | |#
#|_______||_______| |___| |______| |__| |__| |___| |_______||______| #
# #
# Modern CMake practices and importing the QT scripts by adding it to #
# your module path makes things a lot better than it used to be #
@sephirot47
sephirot47 / UE4 Screen debug log
Last active August 25, 2022 13:03
UE4 Screen debug log
//Pars: id, seconds, color, text
GEngine->AddOnScreenDebugMessage(0, 1, FColor::Red, TEXT("HI"));
GEngine->AddOnScreenDebugMessage(76867, 3, FColor::MakeRandomColor(), FString::FromInt(8572));
GEngine->AddOnScreenDebugMessage(76867, 5, FColor::MakeRandomColor(), FString::SanitizeFloat(3.141592f));
@sephirot47
sephirot47 / UE4 Pause - Resume Game .cpp
Last active January 5, 2023 11:34
UE4 Pause - Resume Game
/*
There's a function you can call to pause / resume the game in UE4:
UGameplayStatics::SetGamePaused(GetWorld(), true); //true = paused, false = resume
So you would do something like this:
*/
void Pause()
{
@IJEMIN
IJEMIN / ExportPackage.cs
Created December 3, 2017 10:08
Unity Export Package with Tag and Layers and Input Settings
// 단순 유니티 패키지 제작용 스크립트
using UnityEngine;
using System.Collections;
using UnityEditor;
public static class ExportPackage {
@vurtun
vurtun / _GJK.md
Last active October 13, 2025 01:37
3D Gilbert–Johnson–Keerthi (GJK) distance algorithm

Gilbert–Johnson–Keerthi (GJK) 3D distance algorithm

The Gilbert–Johnson–Keerthi (GJK) distance algorithm is a method of determining the minimum distance between two convex sets. The algorithm's stability, speed which operates in near-constant time, and small storage footprint make it popular for realtime collision detection.

Unlike many other distance algorithms, it has no requirments on geometry data to be stored in any specific format, but instead relies solely on a support function to iteratively generate closer simplices to the correct answer using the Minkowski sum (CSO) of two convex shapes.

@leodutra
leodutra / enable-win-git-long-paths.md
Last active October 30, 2025 10:21
Enable long paths on Windows 11 or Windows 10 and Git

Enable Long Paths on Windows

Instructions for Windows 11 and Windows 10

Windows 11

Method 1: Registry Editor (Most Reliable)

  1. Press Win + R, type regedit, and press Enter
  2. Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
  3. Find LongPathsEnabled (create it if missing as DWORD)
@ditzel
ditzel / PhysicsHelper.cs
Created January 20, 2019 16:54
Unity Helper for Physic Functions
using UnityEngine;
namespace Ditzelgames
{
public static class PhysicsHelper
{
public static void ApplyForceToReachVelocity(Rigidbody rigidbody, Vector3 velocity, float force = 1, ForceMode mode = ForceMode.Force)
{
if (force == 0 || velocity.magnitude == 0)