Skip to content

Instantly share code, notes, and snippets.

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power]
"EnableInputSuppression"=dword:00000001
"IgnoreLidStateForInputSuppression"=dword:00000001
"DisableDisplayBurstOnPowerSourceChange"=dword:00000001
;Apply only if your PC supports modern standby, S0-Idle Mode (and not S3-Suspend To Ram).
;If the slightest movement of your mouse causes your new laptop to wake and you couldn't solve it by unchecking "allow this device to wake the computer", proceed.
@mkckr0
mkckr0 / init.gradle.kts
Last active January 12, 2026 03:16
Gradle 设置全局镜像源,支持 Android 项目,解决镜像源缺失 POM 或 JAR 文件,支持直接替换 URL
// https://gist.github.com/mkckr0/97ec5b0d99feede4c19ee6f905d5e722
val repoMirrorMap = mapOf(
"https://repo.maven.apache.org/maven2" to "https://maven.aliyun.com/repository/central",
"https://dl.google.com/dl/android/maven2" to "https://maven.aliyun.com/repository/google",
"https://plugins.gradle.org/m2" to "https://maven.aliyun.com/repository/gradle-plugin",
"https://jcenter.bintray.com" to "https://maven.aliyun.com/repository/jcenter",
)
val repoReplaceMap = mapOf(
"https://maven.google.com" to "https://dl.google.com/dl/android/maven2"
@lylwo317
lylwo317 / dsdt.dsl
Last active December 29, 2022 06:51
thinkbook 14p dsdt fix s3 mode
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20220331 (64-bit version)
* Copyright (c) 2000 - 2022 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of dsdt.dat, Wed May 4 12:07:23 2022
*
* Original Table Header:
@Kingtous
Kingtous / dsdt.dsl
Last active September 29, 2025 11:47
Thinkbook 14p patched DSDT for enabling S3 suspend state and fixing ACPI Error for \.SB_.LID0 (Based on BIOS version 39WW)
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20211217 (64-bit version)
* Copyright (c) 2000 - 2021 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of dsdt.dat, Fri Apr 8 00:35:05 2022
*
* Original Table Header:
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active March 12, 2026 02:08
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public enum ${NAME} {
;
/**
* enum value
*/
private final int value;
/**
@javanna
javanna / acpi_yogaX1_fedora28
Created July 15, 2018 19:02
S3 deep sleep for Lenovo yoga X1 3rd Generation on Fedora 28
This is a step-by-step guide on how make sleep mode work with a Lenovo Yoga X1 3rd generation running Fedora 28 (UEFI based system).
Kernel version: 4.17.4-200.fc28.x86_64
Credits: most of this guide comes from `https://delta-xi.net/#056`. The patch I used is a little different though, taken from http://kernel.dk/acpi.patch
(found through https://bbs.archlinux.org/viewtopic.php?pid=1794150#p1794150), and some of the steps slightly differ as well as mine is a UEFI based system.
1. Reboot, enter BIOS/UEFI. Go to Config - Thunderbolt (TM) 3 - set Thunderbolt BIOS Assist Mode to Enabled. Set also Security - Secure Boot to Disabled.
2. Install iasl (Intel's compiler/decompiler for ACPI machine language) and cpio: `sudo yum install acpica-tools cpio`
@Leandros
Leandros / random.h
Created July 2, 2018 05:22
C++ Pseudo Random Number Generators
/* Copyright (c) 2018 Arvid Gerstmann. */
/* This code is licensed under MIT license. */
#ifndef AG_RANDOM_H
#define AG_RANDOM_H
class splitmix
{
public:
using result_type = uint32_t;
static constexpr result_type (min)() { return 0; }
@mitchellmebane
mitchellmebane / windows-build-tools_manual.md
Last active March 1, 2021 08:12
NPM windows-build-tools manual install

Visual Studio 2015 Build Tools (1.73 GB)

Downloading

  1. Get VS2015 url from https://github.com/felixrieseberg/windows-build-tools/blob/master/src/constants.ts
  2. Save file into C:\vs_build_tools\windows-build-tools_vs2015\
    • C:\vs_build_tools\windows-build-tools_vs2015\visualcppbuildtools_full.exe
  3. Open cmd prompt and run installer in offline-installer-builder mode (as per https://msdn.microsoft.com/en-us/library/mt706497.aspx)
    • cd /d C:\vs_build_tools\windows-build-tools_vs2015\