Skip to content

Instantly share code, notes, and snippets.

@frolleks
frolleks / DECOMPILING_AN_ELECTRON_APP.md
Last active May 10, 2024 03:09
How to decompile an Electron app

Let me tell you how easy it is to decompile an Electron app (that's closed source).

Prerequisites

Decompilation

First of all, you find the install path of your Electron app. If you found it, find the resources folder. If you found it, you'll have to install asar globally, by running:

@WolfgangSenff
WolfgangSenff / gist:168cb0cbd486c8c9cd507f232165b976
Last active May 10, 2024 03:03
Godot 4.0 Migration/Upgrade guide
## For a beginner-friendly version of the following (more advanced users likely will get better use of the below,
## if you're just starting out...), see this new gist:
## https://gist.github.com/WolfgangSenff/0a9c1d800db42a9a9441b2d0288ed0fd
This document represents the beginning of an upgrade or migration document for GDScript 2.0 and Godot 4.0. I'm focusing on 2D
at the moment as I'm upgrading a 2D game, but will hopefully have more to add for 3D afterward.
## If you want more content like this, please help fund my cat's medical bills at https://ko-fi.com/kyleszklenski - thank you very much! On to the migration guide.
@chetan
chetan / yardoc_cheatsheet.md
Last active May 10, 2024 02:53
YARD cheatsheet
@tatumroaquin
tatumroaquin / wsl2-usbipd-kernel.md
Last active May 10, 2024 02:52
WSL2 custom kernel for usb support

WSL2 USB/IP Kernel Build

At the time of writing WSL 2 does not have official support for interfacing with USB type devices. To solve this, a fork of the usbip project is modified by Microsoft to allow virtual connectivity between USB devices on a host via the USB/IP protocol.

Though it is recommended to use the usbip from a Windows 11 host, there is a way to build a custom WSL2 Kernel in Windows 10 with usbip driver support enabled for USB Mass Storage devices.

This is a supplementary guide which allows for a more linear step by step instruction to eliminate the confusion introduced by the official documentation.

Install USB/IP Client

use std::fs::{File, remove_file};
use std::io::{Read, Write};
use orion::hazardous::{
aead::xchacha20poly1305::{seal, open, Nonce, SecretKey},
mac::poly1305::POLY1305_OUTSIZE,
stream::xchacha20::XCHACHA_NONCESIZE,
};
use orion::hazardous::stream::chacha20::CHACHA_KEYSIZE;
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 10, 2024 02:42
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@repodevs
repodevs / macOS.sh
Created December 12, 2018 14:56
gpg: signing failed: Inappropriate ioctl for device macOS
❱ git config user.signingKey 38AF394C
❱ git config commit.gpgSign true
❱ echo "test" | gpg --clearsign
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
test
gpg: signing failed: Inappropriate ioctl for device
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device
@niksumeiko
niksumeiko / git.migrate
Last active May 10, 2024 02:41
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@lithium0003
lithium0003 / BitLinear.cpp
Last active May 10, 2024 02:40
BitNet b1.58 BitLinear layer's fast multiply weight
#ifdef __ARM_FEATURE_DOTPROD
if(lastdim % 16 == 0) {
for(int i = 0; i < outer_shape; i++) {
for(int k = 0; k < unit; k++) {
int64_t v = 0;
auto *xp = &x_quant[i * lastdim];
auto *wp = &q_weight[k * lastdim];
asm volatile(
"MOV x0, xzr\n"
"DUP v0.2d, x0\n"
@layneson
layneson / build.zig
Created April 15, 2020 15:33
Custom step in build.zig
const std = @import("std");
const Builder = std.build.Builder;
const Step = std.build.Step;
pub fn build(b: *Builder) void {
const target = b.standardTargetOptions(.{});
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("hw", "hw.zig");
exe.setTarget(target);