Skip to content

Instantly share code, notes, and snippets.

View VMatrix1900's full-sized avatar

Vincent Stone VMatrix1900

  • Huawei
  • Beijing, China
View GitHub Profile
#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);