Skip to content

Instantly share code, notes, and snippets.

View kamalx's full-sized avatar

Kamal Morjal kamalx

  • India
View GitHub Profile
@kamalx
kamalx / white-twig-with-16-white-leaves.svg
Created March 4, 2023 07:36
Twig with 16 leaves SVG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kamalx
kamalx / glass-card-w-svg-gsap-ode-to-phil-goodwin-unfold.markdown
Last active May 30, 2023 20:25
Glass Card w/ SVG + GSAP (ode to Phil Goodwin @ Unfold)
@kamalx
kamalx / string_manipulation.md
Last active June 4, 2023 06:57 — forked from valosekj/string_manipulation.md
Useful string manipulation examples for bash and zsh #blog

Useful string manipulation examples for bash and zsh

I need very often to modify filenames or replace/delete their parts across huge number of files. I was using sed command for these purposes but recently I have found out that all these tasks can be easily done directly in bash (or zsh) because both of them support so called string manipulation operations.

String manipulations

magic incantation what does it do?
${#string} Get string length
@kamalx
kamalx / 1. main.css
Created June 6, 2023 03:13 — forked from EmranAhmed/1. main.css
CSS Responsive breakpoint, Media Query break point
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
@kamalx
kamalx / privatekeysolana.js
Created June 23, 2023 13:51 — forked from Xavier59/privatekeysolana.js
Convert Solana private key from/to base58/uint8array
// exporting from a bs58 private key to an Uint8Array
// == from phantom private key to solana cli id.json key file
// npm install bs58 @solana/web3.js
const web3 = require("@solana/web3.js");
const bs58 = require('bs58');
let secretKey = bs58.decode("[base58 private key here]");
console.log(`[${web3.Keypair.fromSecretKey(secretKey).secretKey}]`);
// exporting back from Uint8Array to bs58 private key