Skip to content

Instantly share code, notes, and snippets.

View 2shrestha22's full-sized avatar
💙
Dart / Flutter

Sangam Shrestha 2shrestha22

💙
Dart / Flutter
View GitHub Profile
@2shrestha22
2shrestha22 / magisk_flash.sh
Last active June 3, 2024 10:17
Helper script to flash Magisk for non A/B device.
#!/bin/bash
# To run this:
# bash <(curl -sL https://gist.githubusercontent.com/2shrestha22/b2f15066c1627085e0913ac52d243d62/raw/2c477da35d44b77a510783a1d1494cc90feb9217/magisk_flash.sh)
BOOT_IMAGE_FILE_NAME="boot.img"
BOOT_IMAGE_FILE_PATH="./$BOOT_IMAGE_FILE_NAME"
echo -e "Helper srcipt to flash Magisk patched boot.img for non A/B device...\n"
if adb shell getprop ro.build.ab_update | grep -q true; then

TLP 1.4 Test: Battery Care for Lenovo Laptops (non-ThinkPad series)

Read the overview document first.

Supported Features

Lenovo laptop series using the ideapad_laptop driver have a feature called 'battery conservation mode', basically a fixed stop charge threshold at 60%. The hardware behaviour is:

  1. Connected to the charger, charging stops when the charge level reaches the stop threshold
@andrebrait
andrebrait / keychron_linux.md
Last active September 17, 2024 19:49
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@pierremonico
pierremonico / Postman.desktop
Last active April 27, 2023 11:52 — forked from aviskase/Postman.desktop
Install Postman
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/opt/Postman/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;
@joepie91
joepie91 / .md
Last active June 10, 2024 14:18
Running a Node.js application using nvm as a systemd service

Read this first!

Hi there! Since this post was originally written, nvm has gained some new tools, and some people have suggested alternative (and potentially better) approaches for modern systems. Make sure to have a look at the comments to this article, before following this guide!


The original article

Trickier than it seems.

@zhiguangwang
zhiguangwang / README.md
Last active September 15, 2024 09:06
Installing and running shadowsocks on Ubuntu Server

Installing and running shadowsocks on Ubuntu Server

16.10 yakkety and above

  1. Install the the shadowsocks-libev package from apt repository.

     sudo apt update
     sudo apt install shadowsocks-libev
    
  2. Save ss.json as /etc/shadowsocks-libev/config.json.