Skip to content

Instantly share code, notes, and snippets.

View xream's full-sized avatar

xream xream

View GitHub Profile
@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
}
@xream
xream / config.py
Last active October 8, 2016 20:32
Keyhac config
from keyhac import *
def configure(keymap):
# 默认编辑器
keymap.editor = 'Atom'
# 改键
keymap_global = keymap.defineWindowKeymap()
# 按一下左 Shift 为 F13
keymap_global[ 'O-LShift' ] = '(105)'