Skip to content

Instantly share code, notes, and snippets.

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

legendtang

:shipit:
Coding
View GitHub Profile
@wong2
wong2 / cmds.txt
Last active May 2, 2021 12:13
在任意聊天中输入。 [ ]表示后面要跟一个空格(可能还需要别的参数才能生效)
//wearversion
//wearlog
//wearvoiceinputenable
//wearvoiceinputdisable
//weargoogleapi
//assert
//pushassert
//uplog
//upcrash
//switchnotificationstatus
@u0d7i
u0d7i / disable_vim_auto_visual_on_mouse.txt
Last active February 27, 2024 14:08
Disable vim automatic visual mode on mouse select
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a
#include "clang/AST/AST.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Driver/Options.h"
#include "clang/Frontend/ASTConsumers.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/FrontendActions.h"
#include "clang/Rewrite/Core/Rewriter.h"
#include "clang/Tooling/CommonOptionsParser.h"
@hexchain
hexchain / 51-noto-color-emoji.conf.xml
Last active July 7, 2020 23:42
Emoji on Linux desktop. Use with aur/cairo-coloredemoji.
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/conf.avail/51-noto-color-emoji.conf -->
<fontconfig>
<selectfont>
<acceptfont>
<pattern>
<patelt name="family"><string>Noto Color Emoji</string></patelt>
</pattern>
</acceptfont>
@paulirish
paulirish / open-chrome-tabs-in-safari.scpt
Created April 4, 2016 00:24
open chrome tabs in safari
tell application "Google Chrome"
set tab_list to every tab in the front window
repeat with the_tab in tab_list
set the_url to the URL of the_tab
tell application "Safari" to open location the_url
end repeat
end tell
@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
@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
#!/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
@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;
@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"