Skip to content

Instantly share code, notes, and snippets.

View legendtang's full-sized avatar
:shipit:
Coding

legendtang

:shipit:
Coding
View GitHub Profile
@mkckr0
mkckr0 / init.gradle.kts
Last active November 29, 2025 03:18
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"
@Nexarian
Nexarian / xrdp-nvidia-setup.sh
Last active December 3, 2025 05:13
Setup for XRDP using Nvidia Acceleration
#!/usr/bin/env bash
set -e
cd ~
sudo -v
# Make sure system is in a good, updated, clean, state.
sudo apt-get -y update
@maelvls
maelvls / README.md
Last active November 29, 2025 22:32
Ubuntu, libsecret, git-credential-helper

Dealing with secrets

GNOME comes with libsecret. You can use libsecret to store your git credentials:

sudo apt install libsecret-1-0 libsecret-1-dev libglib2.0-dev
sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
@rossarioking
rossarioking / WindowsUpdatesByPassWSUS.ps1
Last active March 28, 2025 20:26
PowerShell Script to Bypass Local WSUS Server and Pull Updates Straight from the Internet. #PowerShell
# Stop the Windows Update service
Stop-Service -Name wuauserv
# Remove the registry key
Remove-Item HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate -Recurse
# Start the Windows Update service
Start-Service -name wuauserv
@alovak
alovak / fixlinks
Last active January 19, 2022 16:52
notion.so export to html
@ruario
ruario / make-install-remove.md
Last active August 6, 2025 23:04
Uninstalling (removing) a package installed via make install. No make uninstall target required

make install, uninstall help (howto remove)

Background

A common mistake for users who are new to Linux (and even a few seasoned users) is to install a package from source without any clear idea about how they will remove it in the future, should they want to.

The classic instructions to install a source package are ./configure && make && make install. This (or slight variants) can work nicely for installation but

# **DEBIAN WHEEZY TO DEBIAN STRETCH**
#
#
# To run this script, enter the following line (without the preceeding #) at the command line
# apt-get update;apt-get install -y screen apt-utils ca-certificates;wget https://gist.github.com/lowendscripts/9631c6070b241daefcc7d10a2fdb76a2/raw/97b76f1005927cc4a66aa0d5d8965f7867020c55/wheezy_to_stretch_installer.sh; bash wheezy_to_stretch_installer.sh
#
# 0) This is just here for the script version. If you are running the script version, and you become disconnected,
# you can resume the session upon reconnecting to SSH by entering the command screen -dr
# Delete the next two lines if you want to disable the kernel check
kernel_version=`uname -r`
@rudolfratusinski
rudolfratusinski / parallels_tools_ubuntu_new_kernel_fix.md
Last active November 24, 2024 02:13
Parallels Tools fix for Ubuntu 18.04 and other Linux distributions with Kernel version >= 4.15

Preparation

  • In open Ubuntu 18.04 machine click Parallels Actions -> "Install Parallels Tools"

  • A "Parallels Tools" CD will popup on your Ubuntu desktop.

  • Open it by double mouse click, copy all the content to a new, empty directory on a desktop, name it for e.g. "parallels_fixed"

  • Open terminal, change directory to parallels_fixed (cd ~/Desktop/parallels_fixed)

  • Make command line installer executable (chmod +x install)

  • Change directory to "installer" (cd installer)

  • Make few other scripts executable: chmod +x installer.* *.sh prl_*

@p3x-robot
p3x-robot / ntfs-file-system-increase-speed-performance.com
Last active August 2, 2024 02:21
🚄 This is a simple utility to increase the NTFS performance by turning off some NTFS features that are not so used by now (or not so important).
rem execute as an Administrator
rem based on http://www.windowsdevcenter.com/pub/a/windows/2005/02/08/NTFS_Hacks.html
ram based on https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc938961(v=technet.10)
rem http://archive.oreilly.com/cs/user/view/cs_msg/95219 (some installers need 8dot3 filenames)
rem disable 8dot3 filenames
ram Warning: Some applications such as incremental backup utilities rely on this update information and do not function correctly without it.
fsutil behavior set disable8dot3 1
@songouyang
songouyang / thunder.sh
Last active March 17, 2021 04:39
删除 Mac 版迅雷垃圾组件
#!/bin/bash
cd /Applications/Thunder.app/Contents
echo "Removing XLPlayer..."
rm -rf Bundles/XLPlayer.app
echo "Removing unnecessary plugins..."
cd PlugIns/
sudo rm -rf advertising.xlplugin featuredpage.xlplugin iOSThunder.xlplugin liveupdate.xlplugin lixianspace.xlplugin myvip.xlplugin softmanager.xlplugin viprenew.xlplugin viptask.xlplugin viptips.xlplugin xiazaibao.xlplugin xlplayer.xlplugin activitycenter.xlplugin bbassistant.xlplugin livestream.xlplugin
sudo rm -rf webgame.xlplugin onethingcloud.xlplugin thunderword.xlplugin
echo "Disable autoupdate..."
sudo bash -c "echo '127.0.0.1 http://liveupdate.mac.sandai.net' >> /etc/hosts"