Skip to content

Instantly share code, notes, and snippets.

View alonsogb's full-sized avatar

Alonso García Balbuena alonsogb

View GitHub Profile
@NordicGamerFE
NordicGamerFE / performancemods18.md
Last active February 23, 2025 23:28
Performance Mods 1.18

Performance Mods

A list of performance-enhancing mods for 1.18.x forge/fabric versions.

Any suggestions/complaints?
Join our discord or use the gist comments.

Home

Fabric 1.18.X

@zmts
zmts / resolveWebtackAlias.md
Last active June 9, 2023 07:40
Resolve Webpack alias in Webstorm

Resolve Webpack alias in Webstorm

import UiButton from '@/components/UiButton'
import UiDataBox from '@/components/UiDataBox'

https://blog.jetbrains.com/webstorm/2017/06/webstorm-2017-2-eap-172-2827/

By default WebStorm will analyse the webpack configuration file in the root of the project, but you can select another file in Preferences | Languages & Frameworks | JavaScript | Webpack

@bgauduch
bgauduch / multiple-repository-and-identities-git-configuration.md
Last active April 26, 2025 18:37
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@loilo
loilo / pass-slots.md
Last active February 20, 2025 09:47
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {

@OliverJAsh
OliverJAsh / foo.ts
Last active January 27, 2025 18:24
Records and dictionaries in TypeScript
/*
In JavaScript, objects can be used to serve various purposes.
To maximise our usage of the type system, we should assign different types to our objects depending
on the desired purpose.
In this blog post I will clarify two common purposes for objects known as records and dictionaries
(aka maps), and how they can both be used with regards to the type system.
@lamberta
lamberta / parseFunction.js
Created September 23, 2012 03:57
Parse a JavaScript string function definition and return a function object. Does not use eval.
/* Parse a string function definition and return a function object. Does not use eval.
* @param {string} str
* @return {function}
*
* Example:
* var f = function (x, y) { return x * y; };
* var g = parseFunction(f.toString());
* g(33, 3); //=> 99
*/
function parseFunction (str) {