Skip to content

Instantly share code, notes, and snippets.

@npwolf
npwolf / copy_github_autolinks.py
Created January 15, 2025 00:08
Copy github autolinks from one repo to all repos in an organization
@computercam
computercam / nextcloud-docker-backup.sh
Last active January 15, 2025 08:22
docker nextcloud backup / restore
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
TIMESTAMP=`date +"%Y-%m-%d-%T"`
BACKUP_DIR="${DIR}/${TIMESTAMP}"
APPDATA_DIR="${DIR}/../appdata"
MYSQL_USER="root"
MYSQL_PASSWORD="abc123"
MYSQL_DB="nextcloud_db"
@parshap
parshap / node-modules-in-react-native.md
Last active January 15, 2025 08:21
Running Node Modules in React Native

Running Node Modules in React Native

How to use packages that depend on Node.js core modules in React Native.

See the [node-libs-react-native][node-libs-react-native] library as a convenience for implementing this method.

Node.js Core Modules

@gitclone-url
gitclone-url / Boot image extraction guide.md
Last active January 15, 2025 08:20
Guide on how to extract boot image from any android phone without needing to root using magisk and without custom recovery.

Boot Image Extraction Guide

Guide on how to extract a boot image from any Android phone without needing to root using Magisk and without a custom recovery.

Most Android users face hurdles when attempting to root their phones because they require a boot image for patching, and custom recoveries specifically designed for their devices are often unavailable. Additionally, finding the phone firmware online can be challenging. As a result, rooting such phones becomes a daunting task. In this guide, I'll provide a comprehensive solution for users who want to extract the boot image from their phone without the need to root it first, download firmware from the internet, or rely on custom recoveries.

Getting started!

Before diving into the guide, please thoroughly review the Frequently Asked Questions (FAQ) to understand the basics of GSI and the various naming conventi

@peters
peters / Sony WH-1000XM4.md
Last active January 15, 2025 08:19
Connecting Sony WH-1000XM4 to Ubuntu 22.04 (Jammy)

Connecting Sony WH-1000XM4 to Ubuntu 22.04 (Jammy)

This guide will help you connect your Sony WH-1000XM4 headset to Ubuntu 22.04 using Bluetooth. Once connected, you'll be able to listen to music and use the microphone on apps like Microsoft Teams.

1. Connect to Bluetooth Headset

Steps:

  1. Open a terminal and launch bluetoothctl:
@ericlagergren
ericlagergren / gist:2ce4e0ef82871d513aa2
Created May 12, 2015 04:15
Simple fgetc implementation in Go
package main
import (
"fmt"
"os"
"syscall"
)
type File struct {
file *os.File
@ayebrian
ayebrian / vmware.md
Last active January 15, 2025 08:11
VMware ESXi 8 / vCenter 8 / Workstation 17 license key 2024
@ivanscdo
ivanscdo / change_datetime.md
Last active January 15, 2025 08:10
Change Git Log Datetime Format

Change Git Log Datetime Format

Change the default format to something more human readable.


Run the following command:

git config --global log.date format:"%a %b %d %Y %I:%M:%S %p"
@Swader
Swader / build.dart
Created March 14, 2013 18:25
Recursive folder copy in Dart: An updated Dart web_ui build script which recursively copies a folder and its contents to another location. Useful when building for a defined vhost (e.g. Apache with PHP back end for your Dart app) and don't want the build script to relativize your paths to go "one folder up" back from /out into /web to get CSS an…
import 'dart:io';
import 'package:web_ui/component_build.dart';
// Ref: http://www.dartlang.org/articles/dart-web-components/tools.html
main() {
build(new Options().arguments, ['web/index.html']);
//recursiveFolderCopySync('web/assets', 'web/out/assets');
}
bool isSymlink(String pathString) {