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
@startuml | |
' uncomment the line below if you're using computer with a retina display | |
' skinparam dpi 300 | |
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >> | |
' we use bold for primary key | |
' green color for unique | |
' and underscore for not_null | |
!define primary_key(x) <b>x</b> | |
!define unique(x) <color:green>x</color> | |
!define not_null(x) <u>x</u> |
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
###################### | |
## shadowsocks-libev | |
###################### | |
# install dependencies | |
yum install epel-release -y | |
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto udns-devel libev-devel -y | |
# install shadowsocks-libev | |
cd /etc/yum.repos.d/ |
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
/** | |
* @file jsonp请求 | |
*/ | |
// 获取jsonp | |
const jsonp = (options) => { | |
if(!options || !options.url) return; | |
// const container = document.getElementsByTagName('body')[0]; | |
const container = document.body; |
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
/** | |
* Heap 简单的最小堆实现 | |
* | |
* @returns {undefined} | |
*/ | |
var Heap = function() { | |
this.data = []; | |
}; | |
Heap.prototype = { |
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 | |
# Extract pango package | |
cd /tmp | |
rm -rf pango-1.36.8-1-x86_64.pkg.tar.xz | |
wget https://archive.archlinux.org/packages/p/pango/pango-1.36.8-1-x86_64.pkg.tar.xz | |
mkdir pango | |
tar -xJf pango-1.36.8-1-x86_64.pkg.tar.xz -C ./pango | |
# Copy pango lib |
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 | |
# | |
# chkconfig: 35 99 99 | |
# description: Node.js /home/nodejs/sample/app.js | |
# | |
. /etc/rc.d/init.d/functions | |
USER="nodejs" |
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
# Recursively add a .gitignore file to all directories | |
# in the working directory which are empty and don't | |
# start with a dot. Helpful for tracking empty dirs | |
# in a git repository. | |
for i in $(find . -type d -regex ``./[^.].*'' -empty); do touch $i"/.gitignore"; done; |