Skip to content

Instantly share code, notes, and snippets.

View libook's full-sized avatar
🎵
Never Gonna Give You Up~

Daniel Li libook

🎵
Never Gonna Give You Up~
View GitHub Profile
@Renegade605
Renegade605 / zfs_error_check.sh
Last active March 10, 2024 13:56
Unraid ZFS Error Notifications
#!/bin/bash
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# UNRAID ZFS ERROR NOTIFICATION SCRIPT #
# #
# Author: Renegade605 #
# GitHub: https://gist.github.com/Renegade605/8a2d41cc93fa9f01670fc9ba34177c3c #
# Last Updated: 2024-02-28 #
@Chunlin-Li
Chunlin-Li / runService.sh
Created July 24, 2017 06:25
项目启动脚本 (10.8.8.8 使用)
#!/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
<!-- 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>
<!--
@r3b
r3b / complement.js
Created April 24, 2014 15:31
Find the complement of two arrays
// 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;