Skip to content

Instantly share code, notes, and snippets.

View mnabila's full-sized avatar
🏡
Working from home

M. Nabil Adani mnabila

🏡
Working from home
View GitHub Profile
#!/bin/bash
# You can call this script like this:
# $./volume.sh up
# $./volume.sh down
# $./volume.sh mute
# $./volume.sh mtoggle
device='default' #audio device
interval='5' #Percentage by which to update the volume
@FreddieOliveira
FreddieOliveira / docker.md
Last active May 5, 2024 13:30
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

@prologic
prologic / LearnGoIn5mins.md
Last active May 5, 2024 17:05
Learn Go in ~5mins
@Nachtalb
Nachtalb / telegram-desktop-multiple-accounts.rst
Last active March 22, 2024 06:08
Add multiple accounts in Telegram Desktop [Linux | MacOSX | Windows]
@fnky
fnky / ANSI.md
Last active May 5, 2024 19:31
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@panta
panta / logging.go
Last active December 29, 2023 01:13
zerolog with file log rotation (lumberjack) and console output
package logging
import (
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"gopkg.in/natefinch/lumberjack.v2"
"os"
"path"
"io"
)
@LukeSmithxyz
LukeSmithxyz / urlview.md
Last active May 30, 2023 13:27
Following Terminal Links with URLview

Following Terminal Links with URLview

Link handling

Specify what you want urlview to open your links with in ~/.urlview after COMMAND. I.e. the line below will make urlview open all urls in Firefox.

COMMAND firefox
@Pulimet
Pulimet / AdbCommands
Last active May 5, 2024 21:47
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@SKempin
SKempin / Git Subtree basics.md
Last active May 3, 2024 02:57
Git Subtree basics

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.

Background

When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this: