stream editor
磁盘配额工具,针对不同的用户,群组设置不同的配额,quota支队文件系统有效,可以按照inode数量或者总的block容量来限制,支持soft和hard两个配额,当用户的磁盘配额 超过soft容量时,系统给予警告,超出hard配额时,多余的无法写入
- 将文件系统挂载为支持quota:
mount -o remount,usrquota,grpquota /mountpoint
- 初始化quota配置,
quotacheck -ugv -f/mountpoint
其中u和v分别代表检查用户配额和群组配额 - 启用或者禁用quota
quotaon -ug /mountpoint
quotaoff -ug /file-system
- 配置用户或者群组的限额
edquota -u user
edquota -g group
也可以复制某个用户/群组的配置edquota -p source -u target
或者使用直接配置命令setquota user/group blocksoft blockhard inodesoft inodehard /mountpoint
This file contains hidden or 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
import * as qs from 'qs' | |
import {env} from 'src/env' | |
import {timestamp} from './timestamp' | |
// 用于配置不同环境api地址 | |
interface IAPIURL { | |
development: string | |
test: string | |
production: string | |
} |
This file contains hidden or 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
func swapPairs(head *ListNode) *ListNode { | |
if head == nil { | |
return head | |
} | |
dummy := &ListNode{-1, head} | |
previous, current := dummy, head | |
for current != nil { | |
// adjust | |
next := current.Next | |
if next == nil { |
This file contains hidden or 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
func reverseKGroup(head *ListNode, k int) *ListNode { | |
if nil == head || k <= 1 { | |
return head | |
} | |
dummy := &ListNode{-1, head} | |
stack := make([]*ListNode, k) | |
pointer := 0 | |
start, last := head, dummy | |
for nil != start { | |
stack[pointer] = start |