Skip to content

Instantly share code, notes, and snippets.

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

legendtang

:shipit:
Coding
View GitHub Profile
@alovak
alovak / fixlinks
Last active January 19, 2022 16:52
notion.so export to html
@ruario
ruario / make-install-remove.md
Last active December 22, 2023 18:14
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 23, 2022 20:01
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 March 6, 2024 17:38
🚄 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"
@64
64 / 1_0_1-openssl-err.rs
Last active January 29, 2024 02:56
OpenSSL error reason and function codes
// Generated by https://gist.github.com/64/8ac13019f4faa491018aab6b5c265141
extern crate libc;
use libc::c_int;
pub const AEPHK_F_AEP_CTRL: c_int = 100;
pub const AEPHK_F_AEP_FINISH: c_int = 101;
pub const AEPHK_F_AEP_GET_CONNECTION: c_int = 102;
pub const AEPHK_F_AEP_INIT: c_int = 103;
pub const AEPHK_F_AEP_MOD_EXP: c_int = 104;
pub const AEPHK_F_AEP_MOD_EXP_CRT: c_int = 105;
#!/bin/sh
#
# purge-old-kernels - remove old kernel packages
# Copyright (C) 2012 Dustin Kirkland <kirkland@ubuntu.com>
#
# Authors: Dustin Kirkland <kirkland@ubuntu.com>
# Kees Cook <kees@ubuntu.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@brickgao
brickgao / simple_rootkit.c
Created August 6, 2016 14:13
A simple rootkit, works on Ubuntu 12.04 LTS x86
/*
* Copyright (C) <2016> <Brickgao>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@bmhatfield
bmhatfield / .profile
Last active May 6, 2024 22:27
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else