Skip to content

Instantly share code, notes, and snippets.

View xream's full-sized avatar

xream xream

View GitHub Profile
@xream
xream / gist:5f4cda0f482c493a8293d5078d0dab7d
Created November 23, 2017 01:08 — forked from Blankwonder/gist:cd9fa1987e41cf1a1f1df50583ba1d9c
client-side SSL/TLS certificate validation
[Proxy]
TestTLS = https, 192.168.20.6, 443, client-cert=item
[Keystore]
item = password=123456, base64=MIILqQIBAzCCC28GCSqGSIb3DQEHAaCCC2AEggtcMIILWDCCBg8GCSqGSIb3DQEHBqCCBgAwggX8AgEAMIIF9QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIh4LPGCPkcqkCAggAgIIFyDOP/a/YB66H0jctVC5/D3ZF98es9Xtf60hqDokaekMp7VlKhr7EEvf1GrmxOY9XqO1dSR0F2C17yefazR7lZVDwfmNvU8eEpIPrBAnqSnCFyMZGXjcu9aoEySkwRlSclqg9lbFhp9XZG4F4qRuo94mlTPDy47dvdzyiPAQPBIq2DOE/qbRVHqrbnZMkUZi1lxihRRcQv7YJAfLEP2VHffjZTYzlBMi/ldKyD4ZQdpM7mdBtHXFa21ZV9j4oqM2PWWToHwIxkeiS6J2SgfEg501QEy4kbihlp+pSK4OMrj33DrVFP9rOMDnkJtQ+EP0LXXQBaF+7rRp+dekcH+sYBQF0cDMhNEkHEBL8LoQ96hZxIDxE3YQ6fq9KGi4TV8Ktkgb2l0G5DoavN8dhCKS5Gx0nexDT8vj91Js94Xt4tFThSyoc4ZmZvN+b2ugqVvYsnWaKqS8UeAjIAFsZCiLgj4OG6frrAxI+V3c8kL9FrwfFQcL9eWoqVfhBv8SKzMYObTv9FwyJn/fyGdtoT19OpyWiP1+nU+WY7e5KjcJNsKeYolgpgHDXdOSYCakQfesENeeKqvzMA6Quj7g7gZl/AB/GjRybyAXfkxyYBLk5cz7MuDcM1nk6DR47IuHBHyrwOATXyejWYrlK0QUVUsFEmM2vjl38jU8+qxjVWDTFu3gQkFBERncJp1XnKSTueDEPkdeq1BzV1SZ1m1KHNPNI4h2lPa+IKvpYbnDure9n1VV7fk2ySJrBFT5pYonXdpyaCTAvTEFk
@xream
xream / failed.js
Last active August 1, 2023 13:03
测试
console.log($response)
const newResp = {
status: 302,
headers: { location: 'https://google.com' },
// body: "文档说 body 的长度大于0,会自动计算headers中的content-length"
}
console.log(newResp)
$done(newResp)
@xream
xream / karabiner.yaml
Last active September 15, 2017 01:54
karabiner
global:
check_for_updates_on_startup: true
show_in_menu_bar: true
show_profile_name_in_menu_bar: false
profiles:
- complex_modifications:
parameters:
basic.to_if_alone_timeout_milliseconds: 1000
rules:
- manipulators:
@xream
xream / karabiner.json
Created July 14, 2017 03:17
karabiner
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@xream
xream / .tmux.config
Last active March 28, 2017 02:49
tmux config
# hotkey
unbind C-b
unbind C-a
set -g prefix S-F4
# reload
bind -n M-r source-file ~/.tmux.conf \; display-message "Config reloaded"
# last window
bind tab last-window
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"devices": [
{
"use strict"
Beautifier = require('./beautifier')
prettydiff = require("prettydiff")
_ = require('lodash')
module.exports = class VueBeautifier extends Beautifier
name: "Vue Beautifier"
options:
Vue: true
@xream
xream / fish_user_key_bindings.fish
Created November 23, 2016 04:03
CTRL-D to go up
function cdp
..
commandline -f repaint ^/dev/null
end
function fish_user_key_bindings
bind \cd 'cdp'
end
@xream
xream / styles.less
Created November 20, 2016 08:24
atom onedark flat style
.tab-bar .tab.active::after {
opacity: 0;
}
.tab-bar .tab::before {
background: none;
}
.tab-bar {
box-shadow: none;
}
@xream
xream / rx-twit.js
Last active November 3, 2016 16:03
reactive programming with the Twitter streaming API
const conf = require('./conf').twit;
const Twit = require('twit')
const Rx = require('rxjs/Rx')
const subject = new Rx.Subject()
.map(({
text,
user: {
screen_name
}