Skip to content

Instantly share code, notes, and snippets.

@zengpuzhang
zengpuzhang / centos-7-mirrors-aliyun.sh
Created April 14, 2025 02:46 — forked from rbpi/centos-7-mirrors-aliyun.sh
CentOS 7 mirrors&epel with aliyun
#!/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
@zengpuzhang
zengpuzhang / nginx.conf
Created September 12, 2023 02:33 — forked from sgnn7/nginx.conf
NGINX caching
# 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;
@zengpuzhang
zengpuzhang / yii-phar.php
Created May 24, 2017 07:46 — forked from mindplay-dk/yii-phar.php
Package the Yii framework as a .phar archive
<?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:
@zengpuzhang
zengpuzhang / nginx.conf
Last active August 29, 2015 14:19 — forked from morhekil/nginx.conf
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 '
@zengpuzhang
zengpuzhang / pypod.py
Created June 23, 2012 05:02 — forked from chuangbo/README.md
Python dynamic DNSPod DNS Script
#!/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