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
#!/bin/bash | |
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # | |
# # | |
# UNRAID ZFS ERROR NOTIFICATION SCRIPT # | |
# # | |
# Author: Renegade605 # | |
# GitHub: https://gist.github.com/Renegade605/8a2d41cc93fa9f01670fc9ba34177c3c # | |
# Last Updated: 2024-02-28 # |
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
#!/usr/bin/env bash | |
ProjectName="sundries" # 项目名称 | |
Port=3030 # 服务监听端口 , 通过设置 NODE_PORT 环境变量实现 | |
CleanNodeModules=true # 是否每次都清除 node_modules | |
NodeVersion=8.1.2 # node 版本, 需确保 nvm 有该版本 | |
Restart=true # 是否每次都重启服务 | |
if [[ -e $1 ]]; then |
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
<!-- put file in your html --> | |
<script src="../common/forms/gh-pattern.js"></script> | |
<script src="../common/forms/gh-unique.js"></script> | |
<!-- require javascript to app --> | |
<script type="text/javascript"> | |
angular.module('ghValidation', [ 'ghPattern' ,'ghUnique' ]); | |
</script> | |
<!-- |
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
// returns things in array 'a' that are not in array 'b' | |
// > ['a','b','c','1', '2', '3'].complement(['b', 'c', 'd', 'e']); | |
// ['a', '1', '2', '3'] | |
function complement(a, b){ | |
(b)||(b=a, a=this); | |
return (Array.isArray(a) && Array.isArray(b)) | |
? a.filter(function(x){return b.indexOf(x)===-1;}) | |
: undefined; | |
} | |
Array.prototype.complement=complement; |