因为开发中有协同需求,需要远程修改另一台电脑上的文件.
如果使用默认的smb配置,则会有写入权限问题: 既文件权限改成写入人
例如A要去改B电脑上的文件
A改了文件之后,文件的所有权变成了A的,而B没有该文件的权限,这会导致一些问题.
摸索了一下,解决了这个问题
var Observer = function () { | |
}; | |
Observer.prototype = { | |
constructor: Observer, | |
subscribe: function (eventName, func) { | |
if (!this[eventName]) this[eventName] = []; | |
this[eventName].push(func); | |
}, |
function date2ChineseHumanize(date) { | |
let DATE_CN = ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九']; | |
let DATE_UNIT = ['年', '月', '日', '星期', '时', '分', '秒']; | |
let dateArr = [ | |
date.getFullYear(), // 年 | |
date.getMonth() + 1, // 月 | |
date.getDate(), // 日 | |
date.getDay(), // 星期 | |
date.getHours(), // 小时 | |
date.getMinutes(), // 分钟 |
function parse(properties) { | |
const agm = properties.split('.'); | |
return function(target, undefined) { | |
let result = null; | |
(function parseTarget(target, agm) { | |
if (target === void 0) { | |
console.error( | |
'Uncaught TypeError: Cannot read property ' + agm[0] + ' of undefined' | |
); |
function diffTime(time1) { | |
return function(time2) { | |
let seconds = Math.abs(time1 - time2) / 1000; | |
const days = Math.floor(seconds / (3600 * 24)); | |
seconds = seconds - days * 3600 * 24; | |
const hours = Math.floor(seconds / 3600); | |
seconds = seconds - hours * 3600; | |
const minutes = Math.floor(seconds / 60); |
class Point { | |
constructor(x, y) { | |
this.x = x; | |
this.y = y; | |
} | |
distance(point) { | |
const diffX = Math.abs(point.x - this.x); | |
const diffY = Math.abs(point.y - this.y); | |
return Math.sqrt(Math.pow(diffX, 2) + Math.pow(diffY, 2)); | |
} |
因为开发中有协同需求,需要远程修改另一台电脑上的文件.
如果使用默认的smb配置,则会有写入权限问题: 既文件权限改成写入人
例如A要去改B电脑上的文件
A改了文件之后,文件的所有权变成了A的,而B没有该文件的权限,这会导致一些问题.
摸索了一下,解决了这个问题
经过最严格的加密算法加密
用于恢复无法使用两步验证的情况
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
暂时开放所有
iptables -I INPUT -j ACCEPT