Skip to content

Instantly share code, notes, and snippets.

View luisenriquecorona's full-sized avatar
😎
I may be slow to respond.

TextKi JS luisenriquecorona

😎
I may be slow to respond.
View GitHub Profile
@FreyaHolmer
FreyaHolmer / IMGUIDebugger.cs
Created May 2, 2019 04:38
Unity script to open the IMGUI debugger. Useful for editor UI debugging! Make sure you put it in an Editor/ folder in your project
using UnityEditor;
using System;
public static class IMGUIDebugger {
static Type type = Type.GetType( "UnityEditor.GUIViewDebuggerWindow,UnityEditor" );
[MenuItem( "Window/IMGUI Debugger" )]
public static void Open() => EditorWindow.GetWindow( type ).Show();
@bulatie
bulatie / generate_token.py
Last active May 10, 2019 04:23
genereate token
# python2
import os
import string
charset = string.ascii_uppercase + string.digits
random_bytes = os.urandom(25)
len_charset = len(charset)
indices = [int(len_charset * (ord(byte) / 256.0)) for byte in random_bytes]
defaultToken = "".join([charset[index] for index in indices])
const fs = require("fs").promises;
const createReadStream = require("fs").createReadStream;
const debug = require("debug");
class MessageLogDB {
constructor(filename, separator) {
this.separator = separator || "\r\n";
this.separator_length = Buffer.byteLength(this.separator, "utf8");
this.filename = filename;