This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Come from golang.org/x/crypto/ssh/session.go:353 | |
type F func(*Session) | |
for _, setupFd := range []F{(*Session).stdin, (*Session).stdout, (*Session).stderr} { | |
setupFd(s) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var m = function(){ | |
emit(this._id,this) | |
} | |
var r = function(k, value) { | |
// here is the process of update data | |
t = value.running_param.targets; | |
for (var i = 0; i < t.length; i++) { | |
var tmp = t[i].split("/")[1]; | |
if (tmp.indexOf(".") == -1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding=utf-8 | |
def switch(key): | |
return { | |
'keya': '123', | |
'keyb': '456', | |
'keyc': 'aaa' | |
}.get(key,'8888') |