- Install SQUID
apt-get install squid- Create an user
htpasswd -md /etc/squid3/users myuserlogin`| # 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 |
| # 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 |
| # -*- 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`. |
apt-get install squidhtpasswd -md /etc/squid3/users myuserlogin`| /** | |
| * 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])) { |
| import sys | |
| from SimpleHTTPServer import SimpleHTTPRequestHandler | |
| import BaseHTTPServer | |
| def test(HandlerClass=SimpleHTTPRequestHandler, | |
| ServerClass=BaseHTTPServer.HTTPServer): | |
| protocol = "HTTP/1.0" | |
| host = '' |
| #!/bin/sh | |
| # | |
| # rabbitmq-server RabbitMQ broker | |
| # | |
| # chkconfig: - 80 05 | |
| # description: Enable AMQP service provided by RabbitMQ | |
| # | |
| ### BEGIN INIT INFO | |
| # Provides: rabbitmq-server |
| /* 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 <mathias.lafeldt@gmail.com> */ | |
| /* 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/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 <senko.rasic@dobarkod.hr> | |
| # | |
| # Requires Linux, bash and inotifywait (from inotify-tools package). | |
| # | |
| # To avoid executing the command multiple times when a sequence of |
Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.
I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your o