Skip to content

Instantly share code, notes, and snippets.

View egordorichev's full-sized avatar
🖊️
Available for hire

Egor Dorichev egordorichev

🖊️
Available for hire
View GitHub Profile
function init()
white = {1, 1, 1, 1}
black = {0, 0, 0, 1}
red = {1.0, 0.1, 0.2, 1}
combine = g.newShader("combine.frag")
aesthetic = g.newShader("aesthetic.frag")
aesthetic_canvas = g.newCanvas(gw, gh)
displacement_canvas = g.newCanvas(gw, gh)
game_canvas = g.newCanvas(gw, gh)
@prime31
prime31 / FilePicker.cs
Last active November 20, 2023 02:03
Simple file and folder picker for ImGui.Net
using ImGuiNET;
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.IO;
using Num = System.Numerics;
namespace Nez.ImGuiTools
{
public class FilePicker
@rezoner
rezoner / pixel3d-stress-cube.js
Created March 13, 2019 09:54
PIXEL3D work in progress example
/* Code to draw a cube */
function render() {
this.camera.rotation.z += this.elapsed;
for (var x = 0; x < 64; x++) {
for (var y = 0; y < 64; y++) {
for (var z = 0; z < 64; z++) {
@munificent
munificent / generate.c
Last active March 18, 2024 08:31
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@dtzxporter
dtzxporter / DiscordRpc.cs
Last active September 21, 2019 14:21
Discord Rpc .NET
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
//
// Discord Rpc Wrapper for .NET Framework (DTZxPorter) 12/26/2017
// Wrapper created using the open-source discord-rpc extension at:
@josefnpat
josefnpat / readme.md
Last active October 30, 2017 21:37
What is a Fantasy Console?

What is a Fantasy Console

  1. A Fantasy Console (FC) must not have existing hardware.

    E.g. The arduboy is not a fantasy console.

  2. A FC needs to have intentional restrictions not related to the hardware it is being deployed on.

    I feel adding the retro component (e.g. looks like X) to be defeating, as it might stifle the creation of new fantasy consoles. At the end of the day, a FC is based on a fantasy hardware product that is difficult to alter once released. For example; the fantasy console may only have a few MB of memory, whereas the system it is being deployed on may have GB of memory.

@Zemnmez
Zemnmez / tweetdeck-limit-override-dm-rt-fix.js
Last active March 13, 2023 15:21
tweetdeck-limit-override.js
/*
This snippet is esssentially the same as being in the Twitter longer tweets test, for tweetdeck.
The Tweet length counter is fixed by tricking TweetDeck into counting up to 140 characters, twice, so you'll see 140
instead of 280 in the counter but going over 140 will give you another set of 140 charactrs.
*/
TD.services.TwitterClient.prototype.makeTwitterCall=function(b,e,f,g,c,d,h){c=c||function(){};d=d||function(){};b=this.request(b,{method:f,params:Object.assign(e,{weighted_character_count:!0}),processor:g,feedType:h});return b.addCallbacks(function(a){c(a.data)},function(a){d(a.req,"",a.msg,a.req.errors)}),b};
twttrTxt=Object.assign({},twttr.txt,{isInvalidTweet:function(){return!1},getTweetLength:function(x){return x=twttr.txt.getTweetLength.apply(this,arguments),x<140||x/140>2?x:x%140}});
h = figure;
set(h, 'Position', [0 0 (1280+100) (720 + 100)])
WIDTH = 1280;
HEIGHT = 720;
center = [-.73659007459575,-.69270903692418];
[XX,YY] = meshgrid(linspace(0,1,720),linspace(0,1,1280));
Z = ones(size(XX));
@jagrosh
jagrosh / Growing A Discord Server.md
Last active February 17, 2024 04:29
Tips for creating and growing a new Discord server

This guide is kept up-to-date as Discord and available resources change!
A basic server template is available here

Creating and Growing a Discord Server

logo

Introduction

Hello! I'm jagrosh#4824! I'm writing this guide to try to help new server owners set up and grow their servers, which is a commonly-requested topic. It's very easy to go about this the wrong way, so it's best to be prepared and make smart decisions so that your community can flourish!

Background

@milanboers
milanboers / clone.bash
Last active April 5, 2024 05:11
Clone all repositories of a Github user
curl -s https://api.github.com/users/milanboers/repos | grep \"clone_url\" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone