Skip to content

Instantly share code, notes, and snippets.

View b3x206's full-sized avatar
nullptr

Barbaros b3x206

nullptr
  • B3X
  • 13:21 (UTC +03:00)
View GitHub Profile
@SathyaBhat
SathyaBhat / fixperms.bat
Created May 14, 2011 07:25
fix permissions for "You need permissions from .. to perform this action" in Windows 7
takeown /r /d y /f *
icacls * /reset /t /c /q
@volkansalma
volkansalma / atan2_approximation.c
Created June 22, 2012 11:35
optimized atan2 approximation
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
float atan2_approximation1(float y, float x);
float atan2_approximation2(float y, float x);
int main()
{
float x = 1;
@hkuno9000
hkuno9000 / file-sharemode.md
Last active December 22, 2022 18:18
CheetSheet file share mode

Win32/ATL

<WinNT.h>
#define FILE_SHARE_READ                 0x00000001
#define FILE_SHARE_WRITE                0x00000002
#define FILE_SHARE_DELETE               0x00000004

CreateFile(filename, access, sharemode, creation, attributes, ...);
CAtlFile::Open(filename, access, sharemode, creation, attributes, ...);
@MattRix
MattRix / UnityEditorIcons.txt
Last active May 26, 2024 18:55
A list of all the built-in EdtiorGUI icons in Unity. Use EditorGUIUtility.IconContent([icon name]) to access them.
ScriptableObject Icon
_Popup
_Help
Clipboard
SocialNetworks.UDNOpen
SocialNetworks.Tweet
SocialNetworks.FacebookShare
SocialNetworks.LinkedInShare
SocialNetworks.UDNLogo
animationvisibilitytoggleoff
@joncardasis
joncardasis / Storing-Images-On-Github.md
Last active June 25, 2024 16:30
Storing Images and Demos in your Repo

Storing Images and Demos in your Repo

In this quick walkthough you'll learn how to create a separate branch in your repo to house your screenshots and demo gifs for use in your master's readme.

How to

1. Clone a fresh copy of your repo

In order to prevent any loss of work it is best to clone the repo in a separate location to complete this task.

2. Create a new branch

Create a new branch in your repo by using git checkout --orphan assets

@ayamflow
ayamflow / rotate-uv.glsl
Created January 16, 2018 23:24
Rotate UV in GLSL
vec2 rotateUV(vec2 uv, float rotation)
{
float mid = 0.5;
return vec2(
cos(rotation) * (uv.x - mid) + sin(rotation) * (uv.y - mid) + mid,
cos(rotation) * (uv.y - mid) - sin(rotation) * (uv.x - mid) + mid
);
}
vec2 rotateUV(vec2 uv, float rotation, vec2 mid)
@lazlo-bonin
lazlo-bonin / UndoUtility.cs
Last active June 17, 2024 12:51
Fixing Unity's broken Undo.RecordObject
using UnityEditor;
using UnityEngine;
using UnityObject = UnityEngine.Object;
namespace Ludiq
{
public static class UndoUtility
{
private static void RecordObject(UnityObject uo, string name)
{
@yasirkula
yasirkula / GradientGraphic.cs
Last active May 26, 2024 05:48
Create 4-color gradient UI graphics in Unity
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Sprites;
using UnityEngine.UI;
#if UNITY_2017_4 || UNITY_2018_2_OR_NEWER
using UnityEngine.U2D;
#endif
using Sprites = UnityEngine.Sprites;
#if UNITY_EDITOR
@fnky
fnky / ANSI.md
Last active July 7, 2024 08:16
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@StevenACoffman
StevenACoffman / Homoglyphs.md
Last active July 4, 2024 10:09
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ