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
#! /bin/sh | |
set -e | |
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
DESC="uwsgi daemon" | |
UWSGI_DAEMON=/var/www/xcloud_site/xcloud_env/bin/uwsgi | |
UWSGI_CONF=/etc/uwsgi/uwsgi.ini | |
UWSGI_PID=/var/run/uwsgi-emperor.pid |
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
# configuration conversion | |
# 1.comment 2. example 3.grouping | |
[uwsgi] | |
# virtualenv dir path. | |
# EG:'/var/www/xcloud_site/xcloud_env' | |
home = ### | |
# django project path. | |
# EG:'/var/www/xcloud_site/repo' |
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
#!/bin/bash | |
# Detect paths | |
MYSQL=$(which mysql) | |
AWK=$(which awk) | |
GREP=$(which grep) | |
if [ $# -ne 3 ] | |
then | |
echo "Usage: $0 {MySQL-User-Name} {MySQL-User-Password} {MySQL-Database-Name}" |
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
/** | |
* Open external links in new tab/window | |
*/ | |
// All http:// links should open in new tab/window. Internal links are relative. | |
var anchors = document.getElementsByTagName('a'); | |
for (var i = 0; i < anchors.length; i++) { | |
anchor = anchors[i]; | |
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
# coding=utf8 | |
""" | |
# 功能 | |
列出指定时区从1970年01月01日至今,时区历史改动日期,以及夏令开始和结束日期。 | |
# 时区改动 |
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
# 建议:官方文档对每个规则有简单易懂的例子说明,有时间的同学可以查阅一遍。 | |
# 官方文档 https://github.com/brigade/scss-lint/blob/master/lib/scss_lint/linter/README.md | |
# 默认配置 https://github.com/brigade/scss-lint/blob/master/config/default.yml | |
# 版本:0.41.0 | |
# 以下是个人偏好配置 | |
scss_files: "**/*.scss" | |
plugin_directories: ['release'] |
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
# 建议:官方文档对每个规则有简单易懂的例子说明,有时间的同学可以查阅一遍。 | |
# 官方文档 http://eslint.org/docs/rules/ | |
extends: 'eslint:recommended' | |
# 规则按照首字母在字母表升序排序 | |
rules: | |
# 单行代码块大括号后需要一个空格 | |
block-spacing: 2 |
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
let s:prevtabnum=tabpagenr('$') | |
augroup TabClosed | |
autocmd! TabEnter * :if tabpagenr('$')<s:prevtabnum && tabpagenr()>1 | |
\ | tabprevious | |
\ |endif | |
\ |let s:prevtabnum=tabpagenr('$') | |
augroup END |
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
// ==UserScript== | |
// @name redmine-issue-link | |
// @namespace https://gist.github.com/kelly-apollo/faf2e52d1f1d965e55eb | |
// @version 0.2.2 | |
// @description try to take over the world! | |
// @author Kelly Apollo | |
// @match https://gitlab.gizwits.com/* | |
// ==/UserScript== | |
/* jshint -W097 */ |
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
system_profiler SPPowerDataType | grep Cycle | grep -oE '[0-9]+' | |
OlderNewer