Skip to content

Instantly share code, notes, and snippets.

View elvisisvan's full-sized avatar
🏠
Working from home

elvisisvan

🏠
Working from home
View GitHub Profile
@kennypete
kennypete / navigating_the_modes_of_Vim.md
Created April 18, 2024 20:46
Navigating the modes of Vim

Navigating the modes of Vim

This diagram illustrates navigating through Vim’s modes. It was built factoring Vim 9 (i.e., all its modes, including up to two new modes, cr and cvr, in November 2023). Information about the state() and 'showmode' is provided too.

SVG version

Some features are only available in the SVG version. It is not provided directly from within this gist’s files because SVGs do not always play nicely in GitHub (particularly, refusing to display embedded fonts).

The SVG version includes hover text help, which shows pertinent information about the underlying key, command, mode, etc.

@mjkstra
mjkstra / arch_linux_installation_guide.md
Last active March 31, 2025 23:07
A modern, updated installation guide for Arch Linux with BTRFS on an UEFI system
@e7d
e7d / remove-obsolete-gpg-key-from-dnf.md
Last active March 28, 2025 07:00
Remove obsolete GPG key from DNF (Fedora)
@thecodeboss
thecodeboss / prisma-slonik-usage.ts
Created July 22, 2022 22:01
Prisma/Slonik Usage Example
import { PrismaClient } from '@prisma/client';
import type { User } from '@prisma/client';
import { createPool, sql } from 'slonik';
export const buildBaseConnectionURL = (config) => {
return (
'postgresql://' +
config.DB_USER +
':' +
config.DB_PASS +
@adrianhajdin
adrianhajdin / Transactions.sol
Last active April 1, 2025 10:49
Build and Deploy a Modern Web 3.0 Blockchain App | Solidity, Smart Contracts
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "hardhat/console.sol";
contract Transactions {
uint256 transactionCount;
event Transfer(address from, address receiver, uint amount, string message, uint256 timestamp, string account, string keyword);
@lucidhacker
lucidhacker / code.sh
Last active February 5, 2024 19:20 — forked from tallguyjenks/code.sh
ZettelKasten Sync Code
# update and upgrade installed packages
apt update && apt upgrade
# install cronie and termux-services
pkg install cronie termux-services
# enable the crond service
sv-enable crond
# install and enable vim
@sindresorhus
sindresorhus / esm-package.md
Last active April 2, 2025 17:05
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@FreddieOliveira
FreddieOliveira / docker.md
Last active March 31, 2025 16:16
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@Tamal
Tamal / set-chroot.sh
Last active March 20, 2025 22:39
Setting up chroot from a live image in Fedora. Regenerate grub2 for Fedora.
$ # Use Live CD to boot
$ sudo su # Switch to root
$ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid
$ mount /dev/mapper/fedora_localhost--live-root /mnt # mount root partition
$ cat /mnt/etc/fedora-release
Fedora release 31 (Thirty One)
$ mount /dev/nvme0n1p2 /mnt/boot # mount boot partition
$ mount /dev/nvme0n1p1 /mnt/boot/efi # mount EFI partition
# Note: If you are not able to mount EFI partition ('Input/Output error'),
# You may have to repair ESP file system or format ESP.
@RebelLion420
RebelLion420 / TermuxArchSetup2024.md
Last active March 15, 2025 21:43
How to set up Arch Linux in Termux on Android

NOTICE: This will take up about 3 GB of space on your device, before syncing any repos or projects.

Install Termux from the Play Store and launch it

Once it finishes unpacking:

pkg update

pkg upgrade -y