This file contains hidden or 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 | |
| set -e | |
| mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup | |
| echo "CentOS-Base.repo backup successful" | |
| /bin/cat <<'EOF' > /etc/yum.repos.d/CentOS-Base.repo | |
| # CentOS-Base.repo | |
| # | |
| # The mirror system uses the connecting IP address of the client and the |
This file contains hidden or 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
| # vim:ff=unix:ts=2:sw=2:ai:expandtab | |
| # Cache location setup - this should be the NAS | |
| proxy_cache_path /var/cache/nginx | |
| levels=1:2 | |
| keys_zone=bundle-cache:8M | |
| max_size=100000M | |
| inactive=3M | |
| loader_threshold=330 | |
| loader_files=1000; |
This file contains hidden or 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
| <?php | |
| /* | |
| Place this script in the Yii framework folder (yii-x.y.z.rxxx/yii-phar.php) and run it | |
| to package the framework into a single phar file. | |
| In the "index.php" of your application, assuming you placed the packaged framework under | |
| your application's "protected" folder, add the following line at the top: |
This file contains hidden or 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 { | |
| log_format bodylog '$remote_addr - $remote_user [$time_local] ' | |
| '"$request" $status $body_bytes_sent ' | |
| '"$http_referer" "$http_user_agent" $request_time ' | |
| '<"$request_body" >"$resp_body"'; | |
| lua_need_request_body on; | |
| set $resp_body ""; | |
| body_filter_by_lua ' |
This file contains hidden or 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
| #!/usr/bin/env python | |
| #-*- coding:utf-8 -*- | |
| import httplib, urllib | |
| import socket | |
| import time | |
| params = dict( | |
| login_email="email", # replace with your email | |
| login_password="password", # replace with your password |