Skip to content

Instantly share code, notes, and snippets.

View VMatrix1900's full-sized avatar

Vincent Stone VMatrix1900

  • Huawei
  • Beijing, China
View GitHub Profile
@VMatrix1900
VMatrix1900 / MP_BBR.config
Created September 1, 2017 11:06
MP_BBR compile config
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.4.70 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"

How to setup Shadowsocks on your Ubuntu server

Your school or company network may block the access to a few specific websites. To solve this problem, I'd highly recommend Shadowsocks, since it is the easiest proxy tool I've ever found, and it's FREE (of course iff you have your own server running).

First, ssh to your server, and install Shadowsocks using apt

$ sudo apt install shadowsocks
@VMatrix1900
VMatrix1900 / KillShiftSpace.ahk
Created April 24, 2017 14:43
Autohotkey 脚本禁用Shift + Space快捷键切换全角和半角
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
<+space::
return
#include "keymap_common.h"
#include "led.h"
#include "action_layer.h"
/*
* HHKB Layout
*/
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: Default layer
* ,-----------------------------------------------------------.
@VMatrix1900
VMatrix1900 / 0_reuse_code.js
Created January 26, 2016 05:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
function xnrequest(retext,begin,end,url,pids){
for(var i=0;i<pids.length;i++){
var pid = pids[i].getAttribute("id").replace(retext,"");
var data=begin+pid+end;
new XN.NET.xmlhttp({url:url + "?" + pid,data:data,onSuccess:function(){},
onError:function(){
alert("删除错误");
}});}}
var pids = document.getElementsByClassName("user");
var url = "http://page.renren.com/exitfans"
var sids = document.getElementById("my-status-list").getElementsByTagName("li");
var url = "http://status.renren.com/doing/deleteDoing.do"
for(var i=1;i<sids.length;i++){
var sid = sids[i].getAttribute("status-id");
var formData = new FormData();
formData.append('id',""+sid);
formData.append('requestToken', ""+nx.user.requestToken);
formData.append('_rtk', ""+nx.user._rtk);
var xhr = new XMLHttpRequest();
xhr.open("POST",url, true);
var sids = document.getElementsByClassName("share-item-delete");
var url="http://share.renren.com/share/EditShare.do";
for(var i=0;i<sids.length;i++){
var sid = sids[i].getAttribute("data-id");
var formData = new FormData();
formData.append('action', 'del');
formData.append('sid',""+sid);
formData.append('type', ""+nx.user.id);
formData.append('requestToken', ""+nx.user.requestToken);
formData.append('_rtk', ""+nx.user._rtk);