- Install SQUID
apt-get install squid
- Create an user
htpasswd -md /etc/squid3/users myuserlogin`
| #!/bin/bash | |
| # | |
| # Watch current directory (recursively) for file changes, and execute | |
| # a command when a file or directory is created, modified or deleted. | |
| # | |
| # Written by: Senko Rasic <[email protected]> | |
| # | |
| # Requires Linux, bash and inotifywait (from inotify-tools package). | |
| # | |
| # To avoid executing the command multiple times when a sequence of |
| /* This is the original elf.h file from the GNU C Library; I only removed | |
| the inclusion of feature.h, which is not needed. | |
| On OSX, simply copy the file to /usr/local/include/. | |
| Mathias Lafeldt <[email protected]> */ | |
| /* This file defines standard ELF types, structures, and macros. | |
| Copyright (C) 1995-2003,2004,2005,2006,2007,2008,2009,2010,2011 | |
| Free Software Foundation, Inc. |
| #!/bin/sh | |
| # | |
| # rabbitmq-server RabbitMQ broker | |
| # | |
| # chkconfig: - 80 05 | |
| # description: Enable AMQP service provided by RabbitMQ | |
| # | |
| ### BEGIN INIT INFO | |
| # Provides: rabbitmq-server |
| import sys | |
| from SimpleHTTPServer import SimpleHTTPRequestHandler | |
| import BaseHTTPServer | |
| def test(HandlerClass=SimpleHTTPRequestHandler, | |
| ServerClass=BaseHTTPServer.HTTPServer): | |
| protocol = "HTTP/1.0" | |
| host = '' |
| /** | |
| * Check emoji from string | |
| * | |
| * @return bool if existed emoji in string | |
| */ | |
| function checkEmoji($str) | |
| { | |
| $regexEmoticons = '/[\x{1F600}-\x{1F64F}]/u'; | |
| preg_match($regexEmoticons, $str, $matches_emo); | |
| if (!empty($matches_emo[0])) { |
apt-get install squid
htpasswd -md /etc/squid3/users myuserlogin`
| # -*- coding: utf-8 -*- | |
| """ | |
| Generate a file tree table of contents for a directory of markdown files | |
| run from command line: | |
| $ python md_file_tree.py | |
| will generate a markdown index of all markdown files in the current working | |
| directory and its sub folders and insert it into a file `index.md`. |
| # install haproxy | |
| yum install -y haproxy | |
| # config haproxy for rabbitmq | |
| cat > /etc/haproxy/haproxy.cfg << "EOF" | |
| global | |
| log 127.0.0.1 local0 notice | |
| maxconn 10000 | |
| user haproxy |
| # OpenResty 默认安装在 /usr/local/openresty | |
| # 该文件应该放在 /usr/lib/systemd/system/nginx.service | |
| # 放好后请运行: | |
| # - systemctl enable nginx.service | |
| # - systemctl start nginx.service | |
| # 然后之后就可以用 service nginx [start/reload/stop] 等命令了 | |
| [Unit] | |
| Description=The nginx HTTP and reverse proxy server | |
| After=syslog.target network.target remote-fs.target nss-lookup.target |