Skip to content

Instantly share code, notes, and snippets.

View Zxilly's full-sized avatar
🌐
R.I.P

Zxilly

🌐
R.I.P
View GitHub Profile
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.com/product.schema.json",
"title": "sing-box config schema",
"type": "object",
"$defs": {
"listableString": {
"$comments": "ref:https://github.com/SagerNet/sing-box/blob/b0db869b052aa32ec1716e43f7c1f50d7e491057/option/types.go#L77",
"description": "allow not having to be an array when there's single item",
"oneOf": [
@MaxXSoft
MaxXSoft / Dockerfile
Created November 27, 2022 09:40
A fun tool for generating an x86-64 Linux program that runs in reverse order.
FROM ubuntu:20.04
RUN apt update && DEBIAN_FRONTEND="noninteractive" apt install -y \
python3 build-essential
WORKDIR /root
@sxzz
sxzz / QQ-NT-package.json
Last active February 28, 2024 02:43
package.json for QQ-NT
{
"name": "QQ-NT",
"version": "6.8.3-4068",
"private": true,
"description": "QQ-NT",
"productName": "QQ-NT",
"author": {
"name": "Tencent",
"email": "QQ-Team@tencent.com"
},
@abersheeran
abersheeran / proxy.worker.js
Last active April 13, 2024 08:45
A proxy download cloudflare worker
addEventListener("fetch", (event) => {
event.respondWith(
handleRequest(event.request).catch(
(err) => new Response(err.stack, { status: 500 })
)
);
});
async function handleRequest(request) {
const url = getUrl(request)
@sindresorhus
sindresorhus / esm-package.md
Last active April 19, 2024 10:56
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@FreddieOliveira
FreddieOliveira / docker.md
Last active April 19, 2024 16:36
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

@varunon9
varunon9 / AlwaysRunningAndroidService.md
Last active April 11, 2024 18:45
How to create an always running service in Android

Full Source Code: https://github.com/varunon9/DynamicWallpaper/tree/always_running_service

Steps-

  1. Create a Foreground Service (MyService.java)
  2. Create a Manifest registered Broadcast Receiver (MyReceiver.java) which will start your Foreground Service
  3. In onDestroy lifecycle of MyService, send a broadcast intent to MyReceiver
  4. Launch the MyService on app start from MainActivity (see step 8)
  5. With above 4 steps, MyService will always get re-started when killed as long as onDestroy of Service gets called
  6. onDestroy method of Service is not always guaranteed to be called and hence it might not get started again
@unitycoder
unitycoder / AndroidManifest.xml
Last active March 30, 2024 19:39
Oculus Quest Android Manifest (with READ_EXTERNAL_STORAGE, LAUNCHER and SkipPermissionsDialog)
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto">
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" /><!-- Request the headset DoF mode -->
<application
android:label="@string/app_name"
android:icon="@mipmap/app_icon">
<activity
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
@nikhita
nikhita / update-golang.md
Last active April 19, 2024 17:28
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:

@wagenet
wagenet / glibc.md
Last active February 25, 2024 15:40
glibc Versions

glibc Versions

List of oldest supported version of top 10 Linux Distros and their glibc version according to distrowatch.com.

Summary

Out of all versions with published EOLs, 2.12 is the oldest glibc still active, found in CentOS 6.8.

If CentOS 6 and 7 are eliminated, the oldest glibc is 2.23 in Ubuntu and Slackware.