Skip to content

Instantly share code, notes, and snippets.

@cazala
cazala / emojis.js
Last active December 19, 2023 16:43
Generate emoji hash from input text
async function emojis(input, amount = 4) {
const list = [
"🔥",
"✨",
"🌟",
"💫",
"💥",
"💢",
"💦",
"💧",
@cazala
cazala / work-with-multiple-github-accounts.md
Created August 9, 2023 21:22 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@cazala
cazala / guide.md
Created January 2, 2018 16:19 — forked from menduz/guide.md
Frontend React + TypeScript guidelines

Directory Structure

The sources of the project follows this structure:

/src
  /app
    /{domain}
      /actions.ts
 /actions.spec.ts
@cazala
cazala / space_colonization.pde
Created December 18, 2020 17:51 — forked from shiffman/space_colonization.pde
Space Colonization Attempt
Tree tree;
float min_dist = 5;
float max_dist = 250;
void setup() {
size(180, 300);
tree = new Tree();
}
@cazala
cazala / 3box
Created October 19, 2020 21:00
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreih4vta56c7pcnhogpv2t36qlzq4xz473u5hhc5cb3ty7xomw6lch4 ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiYAAAAAkAAxkR2eQAAAAASUVORK5CYII=
@cazala
cazala / remove_desktop.sh
Created July 2, 2019 16:54
Remove destktop
defaults write com.apple.finder CreateDesktop -bool false
killall Finder
@cazala
cazala / m.js
Created December 13, 2017 16:13
var libUrl = null;
var scriptTag = Array.prototype.slice
.call(document.getElementsByTagName("script"))
.filter(x => /\?proxy?/.test(x.src));
if (scriptTag.length > 0) {
libUrl = scriptTag[0].src.split("m.js")[0];
} else {
throw new Error("missing '?proxy' query parameter in your proxy url!");
}
  renderBoard() {
     return (
       <entity
         position={{
           x: 1.5,
           y: 0,
           z: 1.5
         }}
 &gt;
renderMessage() {
const state = store.getState()
const { whiteTurn } = state.game
const { playerWhite, playerBlack, status } = state.match
const yourTurn =
(whiteTurn && playerWhite === this.id) ||
(!whiteTurn && playerBlack === this.id)
const theirTurn =
(whiteTurn && playerBlack === this.id) ||
(!whiteTurn && playerWhite === this.id