Skip to content

Instantly share code, notes, and snippets.

View t404's full-sized avatar
💭
I may be slow to respond.

涂鹏 t404

💭
I may be slow to respond.
  • Wuhan,Hubei Province.China
View GitHub Profile
@t404
t404 / postman_test.js
Last active November 25, 2020 08:20
[Postman Test Script] #postman
/**
* Postman Test Script
* URL: https://doing-api.herokuapp.com/api/0.1/events/?latitude=27.782887&longitude=-82.6329571
* Description: Events in St. Petersbug, FL
* Method: GET
*/
var jsonData = JSON.parse(responseBody);
// Test Request
@t404
t404 / postman语法.js
Last active November 25, 2020 07:46
[postman语法] #postman
// 设置环境变量
var access_key_id = pm.environment.get('access_key_id');
var secret_access_key = pm.environment.get('secret_access_key');
@t404
t404 / API签名.js
Last active November 25, 2020 07:01
[API签名] #signature #postman
var access_key_id = pm.environment.get('access_key_id');
var secret_access_key = pm.environment.get('secret_access_key');
pm.request.headers.add({
key: 'Content-Type',
value: 'application/json'
});
pm.request.headers.add({
key: 'x-iot-timestamp',
value: Date.parse(new Date())/1000
@t404
t404 / device.proto
Last active November 27, 2020 03:59
[proto import 外部文件] #grpc #proto
// proto/device/device.proto
syntax = "proto3";
package device;
import "list.proto";
import "pointer.proto";
import "device_group.proto";
import "thing/property.proto";
@t404
t404 / .tmux.conf
Created February 8, 2021 10:18
.tmux.conf #tmux
setw -g mode-keys vi
set -g history-limit 100000
bind-key C-b last-window
bind -r h select-pane -L
bind -r l select-pane -R
bind -r j select-pane -D
bind -r k select-pane -U
@t404
t404 / .vimrc
Created February 8, 2021 10:19
.vimrc #vim
" Encoding related
set encoding=utf-8
set langmenu=zh_CN.UTF-8
set fileencoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,iso-8859,euc-jp,euc-kr,latin1
set nu
set go=
syntax on
set ruler
set showcmd