Skip to content

Instantly share code, notes, and snippets.

@DD3Boh
DD3Boh / gist:6c51fd3c5f91b1042e956771483714de
Created July 19, 2017 14:59
How to merge a newer CAF tag in an android kernel
First go here:
https://wiki.codeaurora.org/xwiki/bin/QAEP/release
This site gives information about all msm soc release details with tag + android version
Search your msm here.. Check the latest one and look for correct android version and mark that tag.
Now open one of the following links (dependent on your linux kernel version)
@Darkhogg
Darkhogg / !RebootToOs.md
Last active May 9, 2025 20:40
"Reboot to {OS}" scripts for rEFInd Next Boot selection

Reboot to {OS}

This a collection of notes and files used in my quest to create "Reboot to Windows" and "Reboot to Linux" scripts (and desktop shortcuts) for Linux and Windows respectively that automatically reboot my system and instruct rEFInd to auto-select the appropriate OS entry.

General Information

The key for achieving this is to modify the EFI Variable PreviousBoot with GUID 36d08fa7-cf0b-42f5-8f14-68df73ed3740, which rEFInd uses to store the last entry selected in the menu and, if using the + default entry, will be used to select the default OS. By doing this, we trick rEFInd into booting the OS we choose without having to be physically there to press the keyboard.

@nikhita
nikhita / update-golang.md
Last active May 7, 2025 08:27
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

@mayurah
mayurah / IDM.as
Last active April 19, 2025 12:15
Internet Download Manager / Ubuntu / Wine - Raw Instructions to make it work!
To make good old Internet Download Manager (IDM) work in Linux mint / Ubuntu!
# Declaration: I totally support open source and have tried aria2, and axel; also I am frequent user and admirer of wget, curl and lynx; but the download throughput provided by IDM is unmatched for some odd reasons, specifically it performs better than other clients in mid-to-high latency networks, who knows, may be short time-outs on each connectionns or magic wand.
Some CLI examples if someone would wish to try those and compare throughput of each at 8 connections to get benchmark against IDM!
- $ aria2c --file-allocation=none -c -x 8 -s 8 -d "./location/to/downloads/" http://cachefly.cachefly.net/100mb.test
- $ axel -n 8 http://cachefly.cachefly.net/100mb.test
Below two does not suppot multi-threaded, and are made for other greater purpose :)
@ageis
ageis / systemd_service_hardening.md
Last active May 8, 2025 00:38
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
@auipga
auipga / iperf3.service
Last active February 2, 2025 12:43 — forked from mmasaki/iperf.service
systemd service unit for iperf3
# /etc/systemd/system/iperf3.service
# User service: $HOME/.config/systemd/user/iperf3.service
[Unit]
Description=iperf3 server
After=syslog.target network.target auditd.service
[Service]
ExecStart=/usr/bin/iperf3 -s
/play
/*.png
/*.bmp
/solitaire
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active May 10, 2025 14:55
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@eduncan911
eduncan911 / go-build-all
Last active April 11, 2024 07:14
Go Cross-Compile Script
#!/bin/bash
#
# GoLang cross-compile snippet for Go 1.6+ based loosely on Dave Chaney's cross-compile script:
# http://dave.cheney.net/2012/09/08/an-introduction-to-cross-compilation-with-go
#
# To use:
#
# $ cd ~/path-to/my-awesome-project
# $ go-build-all
#