Skip to content

Instantly share code, notes, and snippets.

View Zireael07's full-sized avatar

Zireael07

View GitHub Profile
@aburjg
aburjg / homoiconic-python-post.md
Last active May 18, 2024 11:27
Homoiconic Python Post
@kennypete
kennypete / navigating_the_modes_of_Vim.md
Created April 18, 2024 20:46
Navigating the modes of Vim

Navigating the modes of Vim

This diagram illustrates navigating through Vim’s modes. It was built factoring Vim 9 (i.e., all its modes, including up to two new modes, cr and cvr, in November 2023). Information about the state() and 'showmode' is provided too.

SVG version

Some features are only available in the SVG version. It is not provided directly from within this gist’s files because SVGs do not always play nicely in GitHub (particularly, refusing to display embedded fonts).

The SVG version includes hover text help, which shows pertinent information about the underlying key, command, mode, etc.

During the past days, this great article by Sam Pruden has been making the rounds around the gamedev community. While the article provides an in-depth analysis, its a bit easy to miss the point and exert the wrong conclusions from it. As such, and in many cases, users unfamiliar with Godot internals have used it points such as following:

  • Godot C# support is inefficient
  • Godot API and binding system is designed around GDScript
  • Godot is not production ready

In this brief article, I will shed a bit more light about how the Godot binding system works and some detail on the Godot

[This portion of call begins at 25:47]

Me: I could make it really easy on you, if you think Apollo is costing you $20 million per year, cut me a check for $10 million and we can both skip off into the sunset. Six months of use. We're good. That's mostly a joke.

Reddit: Six months of use? What do you mean? I know you said that was mostly a joke, but I want to take everything you're saying seriously just to make sure I'm not - what are you referring to?

Me: Okay, if Apollo's opportunity cost currently is $20 million dollars. At the 7 billion requests and API volume. If that's your yearly opportunity cost for Apollo, cut that in half, say for 6 months. Bob's your uncle.

Reddit: You cut out right at the end. I'm not asking you to repeat yourself for a third time, but you legit cut out right at the end. "If your opportunity cost is $10 million" and then I lost you.

@Cenness
Cenness / colors.json
Last active November 5, 2023 12:56
Print out color pairs with their contrast
[
{
"type": "colordef",
"BLACK": [ 33, 34, 37 ],
"RED": [ 254, 63, 22 ],
"GREEN": [ 60, 168, 103 ],
"BROWN": [ 223, 112, 30 ],
"BLUE": [ 0, 106, 170 ],
"MAGENTA": [ 235, 82, 177 ],
"CYAN": [ 7, 163, 167 ],
/*
* Copyright (c) 2023 Jacob Martin
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@dessalines
dessalines / MessagEase_LeftN
Created January 6, 2023 16:15
MessagEase Layout for the MultilingO keyboard
{
"title":"MessagEase_LeftN",
"onScreen":{
"main":[
"[4D:aæ[ALTGR]-[MC:and:][CAPS][MC:with]v$][][4D:n+^!l`´\\/][][4D:i?[SYM][MC:that]=[MC:in:]§€x][][4D:[HIDE][Left][Up][Right][Down]]",
"[4D:h( k {%_[][][4D:ocubd[MC:qu:]pjg][][4D:rm[SHIFT])[MC:tion]|}[RB]@][][4D:[123][UNDO][COPY][REDO][PASTE][CUT][ALL][VOICE][VOICE]]",
"[4D:t<¨*[MC:the:]~y[TAB]][][4D:eœwz.\"':,][][4D:s#&>[MC:of:]f°[MC:[3+2[Colon][RB][Left]:3+2];][][4D:[DEL][WDEL] [FDEL] [MC:[SHIFT][HOME][WDEL]:|«][MC:[SHIFT][END][WDEL]:»|]]",
"[TOOL][SPACE][][][][][][][][4D:[ENTER] [EMOJI][EMOJI]][]"
],
@rsubtil
rsubtil / XML2JSON.gd
Last active September 4, 2022 12:54
Converts XML to JSON in Godot
extends Node
class_name XML2JSON
# Author: @ev1lbl0w (https://github.com/ev1lbl0w)
#
# Converts an XML file into a JSON/Dictionary:
#
# var dict = XML2JSON.parse("example.xml") # "example.xml" in JSON/Dictionary format
#
@Chikanut
Chikanut / SeeThroughMask.hlsl
Last active September 20, 2022 01:22
This is HLSL code of See Through feature, all parameters of shader must be globally seted.
float2 WorldToScreenPos(float3 pos){
pos = normalize(pos - _WorldSpaceCameraPos)*(_ProjectionParams.y + (_ProjectionParams.z - _ProjectionParams.y))+_WorldSpaceCameraPos;
float2 uv =0;
float3 toCam = mul(unity_WorldToCamera, pos);
float camPosZ = toCam.z;
float height = 2 * camPosZ / unity_CameraProjection._m11;
float width = _ScreenParams.x / _ScreenParams.y * height;
uv.x = (toCam.x + width / 2)/width;
uv.y = (toCam.y + height / 2)/width;
return uv;