Skip to content

Instantly share code, notes, and snippets.

View kevinrodriguez-io's full-sized avatar
🌎
To control your destiny start by controlling yourself

Kevin Rodríguez kevinrodriguez-io

🌎
To control your destiny start by controlling yourself
View GitHub Profile
class QueueNode<T> {
public promise: () => Promise<T>;
public next: QueueNode<T> | null;
public finished: boolean;
constructor(promise: () => Promise<T>) {
this.promise = promise;
}
}
class AsyncQueue {
@kevinrodriguez-io
kevinrodriguez-io / bis.md
Created October 1, 2023 04:57 — forked from brandonsturgeon/bis.md
World of Warcraft 3.3.5a Warmane Complete PvE BiS (Best In Slot) List
{
"kty": "RSA",
"e": "AQAB",
"use": "sig",
"kid": "tRmWkDkZSIxS0XDBlzg-H8wGBNbs7HrUa0o_NmeF58o",
"alg": "RS256",
"n": "gFd3QhSe_AbIZ9DVj4bzXixDWcc_vtapXhoz2qqtDcAVMdV8FksZIdFb4zL93e_woEue373k97uk9ecXB39c4Ti1ejngJ6r4Wq-ojvKf_5Baf8jeXym6GQbKose4oEplSweL8YmdE7KXWyt-o7crE9_agmt3HXmeLOsT0mMOTd75KUSiB9ySVwN4HD6d4LKoRe3wmMWm1fhtTvnvqi6KKgPeTBEXv4v6WDnK84KiUOpwGusqr6tJ4PtkcehRjjCySsRzItOs8Jc9V_rLPzd0U7wwv6y9xifju3XekrUjBXTBSlLluAaBndJGX5ib5DTVeTB309QBrWkYtSptiZJpYQ"
}
@kevinrodriguez-io
kevinrodriguez-io / wallet.ts
Created April 7, 2022 03:24
Get Solana Anchor Wallet From File System
import * as anchor from "@project-serum/anchor";
import fs from "fs/promises";
export const getWallet = async (keyPairFile: string) => {
const payer = anchor.web3.Keypair.fromSecretKey(
Buffer.from(
JSON.parse(
await fs.readFile(keyPairFile, {
encoding: "utf-8",
})
@kevinrodriguez-io
kevinrodriguez-io / FIX
Created March 27, 2022 06:38
WSL2 Fix for dropped connections
Created a /etc/wsl.conf containing
[network]
generateResolvConf = false
I exited wsl and then issued a wsl --shutdown
entered wsl force deleted the /etc/resov.conf to stop it being a symbolic link
sudo rm -fd /etc/resov.conf

Keybase proof

I hereby claim:

  • I am kevinrodriguez-io on github.
  • I am misterkevin_rs (https://keybase.io/misterkevin_rs) on keybase.
  • I have a public key ASBF5E3XnJflKkRLS1M4dPl2RRji-YibxjWg8XCBoqv2Cgo

To claim this, I am signing this object:

import React, { createContext, useReducer, useEffect, useState } from 'react';
import { useContext } from 'react';
import { useAsyncStorage } from '@react-native-async-storage/async-storage';
const initialState = {
loading: true,
todos: [],
};
const TodosStateContext = createContext(initialState);
@kevinrodriguez-io
kevinrodriguez-io / Component.tsx
Created August 25, 2020 01:42
How to use the elements
import { XPButton } from '@xproduct/ui';
// Use it here
@kevinrodriguez-io
kevinrodriguez-io / run-docs-2.sh
Created August 25, 2020 01:40
Run docs alternative command
$ yarn workspace @xproduct/ui run dev:all
@kevinrodriguez-io
kevinrodriguez-io / package.jsonc
Created August 25, 2020 01:39
Package json alternative
{
// xproduct/ui package.json
"scripts": {
// ...
"dev:all": "concurrently \"yarn dev\" \"yarn dev:docs\""
}
}