Skip to content

Instantly share code, notes, and snippets.

View sacsbrainz's full-sized avatar
💻
Typescript

Solomon ogu sacsbrainz

💻
Typescript
View GitHub Profile
@sacsbrainz
sacsbrainz / install.sh
Created March 20, 2025 07:10
install layeredge light node on ubuntu/termux
#!/bin/bash
# Clear lock file if it exists
rm -f /tmp/script_lock/running
echo "Starting installation..."
rm -rf /usr/local/go
cd ~/
apt update -y && apt install build-essential pkg-config libssl-dev wget git-all -y
# Check architecture and set appropriate Go download URL
@sacsbrainz
sacsbrainz / install_python3_10.sh
Created October 17, 2024 09:21
install python3.10
#!/bin/bash
set -e
echo "Installing Python 3.10 and troubleshooting venv creation"
# Install Python 3.10
echo "Installing Python 3.10..."
sudo apt update
sudo apt install -y software-properties-common
@sacsbrainz
sacsbrainz / Fix.md
Last active July 12, 2024 09:45
Fix automatic wakeup on laptop running linux (arch, debian, ubuntu, fedora, etc)

kill-enabled.sh

#!/bin/bash

# Check if the script is run as root
if [ "$(id -u)" -ne 0 ]; then
@sacsbrainz
sacsbrainz / install.sh
Last active April 18, 2025 00:42
install docker on MX Linux
#!/usr/bin/env bash
# Prompt user for password
sudo -v
# Update package information
sudo apt update
# Install necessary packages
sudo apt-get install -y ca-certificates curl gnupg tree
@sacsbrainz
sacsbrainz / install-docker-deepin.sh
Last active December 14, 2023 21:06 — forked from madkoding/install-docker-deepin.sh
Install Docker-CE script for Deepin Linux
#!/bin/bash
echo "Starting Docker installation on Deepin Linux..."
# Define a mapping from Deepin version to Debian version
map_deepin_to_debian() {
case "$1" in
20*) echo "buster" ;; # Replace with the correct mapping for Deepin 20
15*) echo "stretch" ;; # Replace with the correct mapping for Deepin 15
*) echo "buster";;
@sacsbrainz
sacsbrainz / configuration.nix
Created October 5, 2023 14:32
configuration.nix
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{
config,
pkgs,
lib,
...
}: {
imports = [
@sacsbrainz
sacsbrainz / fix.md
Created September 11, 2023 14:38
fix chrome strange image / missing images views on chrome

delete this folder

~/.config/google-chrome/Default/GPUCache
@sacsbrainz
sacsbrainz / fix.md
Created September 4, 2023 14:25
fix bad superblock on ntfs drives/partitions

make sure you have ntfs-3g installed

run this code

ntfsfix -b -d /dev/sdb6

@sacsbrainz
sacsbrainz / fix no bootable device error in nixos.md
Last active December 13, 2023 20:24
fix no bootable device error in nixos

Prerequisite

insert a nixos bootable drive

run this command to get list of drives

lsblk

enter sudo mode

@sacsbrainz
sacsbrainz / fix_git.md
Last active August 30, 2023 18:55
Git not picking up changes correctly after copy or os change

run this command to see you old and new mode also look out for the last 3 numbers as this represents the permissions

git diff -G.

so after this we can see the issue, our permissions changed

to fix this they are 2 ways

  1. run this command in the root directory of your project and it will fix the permissions

find . -type f -exec chmod a-x {} \;