Skip to content

Instantly share code, notes, and snippets.

View codeTIT4N's full-sized avatar
⌨️
Rust | Move | TypeScript

Lokesh Kumar codeTIT4N

⌨️
Rust | Move | TypeScript
View GitHub Profile
@codeTIT4N
codeTIT4N / kernel-dev.md
Created November 6, 2023 19:39 — forked from vegard/kernel-dev.md
Getting started with Linux kernel development

Getting started with Linux kernel development

Prerequisites

The Linux kernel is written in C, so you should have at least a basic understanding of C before diving into kernel work. You don't need expert level C knowledge, since you can always pick some things up underway, but it certainly helps to know the language and to have written some userspace C programs already.

It will also help to be a Linux user. If you have never used Linux before, it's probably a good idea to download a distro and get comfortable with it before you start doing kernel work.

Lastly, knowing git is not actually required, but can really help you (since you can dig through changelogs and search for information you'll need). At a minimum you should probably be able to clone the git repository to a local directory.

Docker Completion for Zsh (Official)

  • mkdir -p ~/.oh-my-zsh/plugins/docker/
  • curl -fLo ~/.oh-my-zsh/plugins/docker/_docker https://raw.githubusercontent.com/docker/cli/master/contrib/completion/zsh/_docker
  • Add docker to plugins section in ~/.zshrc
  • exec zsh
@codeTIT4N
codeTIT4N / Faucet.sol
Last active September 2, 2023 21:53
Simple solidity faucet for funding wallets
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
/// @title Solidity Faucet
/// @author Lokesh Kumar (https://github.com/codeTIT4N)
/// @notice This is a simple faucet contract
/// @dev Has a cooldown period for every wallet of 24 hrs
/// @dev Keeps a reserve in case the fund sender(authorized address) runs out of gas while funding wallets
contract Faucet {
@codeTIT4N
codeTIT4N / base64ToHex.js
Last active September 2, 2023 21:55
convert base64 to hex
const crypto = require("crypto");
const keyAsTxt =
"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEgyYqQmUAmDn9J7dR5xl-HlyAA0R2XV5sgQRnSGXbLt_xCrEdD1IVvvkyTmRD16y9p3C2O4PTZ0OF_ZYD2JgTVA==";
const keyAsBytes = Buffer.from(keyAsTxt, "base64");
const keySpec = new Uint8Array(keyAsBytes);
const algo = { name: "ECDSA", namedCurve: "P-256" };
(async () => {