Skip to content

Instantly share code, notes, and snippets.

View binderclip's full-sized avatar
👨‍💻
build

clip binderclip

👨‍💻
build
  • Beijing
View GitHub Profile
@binderclip
binderclip / deploy-flask-gunicorn-supervisor-nginx.md
Last active March 22, 2023 09:17
Flask Gunicorn Supervisor Nginx 项目部署小总结

Flask Gunicorn Supervisor Nginx 项目部署小总结

服务器的基本连接和配置

SSH 连接

使用公钥私钥来登陆而不是账号密码,公钥私钥需要简单的在本地生成一下。Github 的生成 SSH 公钥私钥的教程:Generating SSH keys

可能需要使用 -i 参数选择一下本地的私钥,一个示例的 ssh 连接如下:

@binderclip
binderclip / set-proxy-for-atom.md
Created September 12, 2015 04:27
set shadowsocks proxy for atom

~/.atom/.apmrc

strict-ssl = false
http-proxy = http://127.0.0.1:8090/proxy.pac
$ apm config list
...
@binderclip
binderclip / atom-and-python.md
Created September 14, 2015 12:50
use atom for python coding

自动补齐

  • 自带的 language-python 已经支持一部分的自动补齐
  • 更高级的可以使用 autocomplete-python

代码检查(使用 Flake)

@binderclip
binderclip / play.md
Last active September 18, 2015 11:05
play use curl
@binderclip
binderclip / simple-ad-stat.html
Created October 12, 2015 04:12
简单的广告统计测试页面
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>广告统计</title>
<script src="jquery.js"></script>
</head>
<body>
<a href="http://localhost:8000/apple" ad-load-url="http://localhost:8000/apple/load" ad-click-url="http://localhost:8000/apple/click">apple</a>
<a href="http://localhost:8000/orange" ad-load-url="http://localhost:8000/orange/load" ad-click-url="http://localhost:8000/orange/click">orange</a>
@binderclip
binderclip / catch-https.md
Last active September 20, 2018 10:05
使用 Charles 做一些抓包工作

HTTPS 抓包

普通的 HTTPS 抓包配置

一般的公开的网站用这种方式就好了。

  1. 首先装上 Charles 的根证书    1. 电脑的话:Help -> SSL Proxying -> Install Charles Root Cetificate    2. 手机的话:Help -> SSL Proxying -> Install Charles Root Cetificate on a Mobile Device or Remote Browser 会有提示       1. 大概是在手机设置了代理之后用浏览器访问 chls.pro/ssl 来下载、安装证书
@binderclip
binderclip / arduino_car.ino
Last active April 4, 2016 09:01
Arduino WiFi 小车
int led = 13;
int m1a = 5;
int m1b = 6;
int m2a = 10;
int m2b = 11;
int s1q = 220;
int s1s = 150;
int s2q = 220;
@binderclip
binderclip / hello_http_proxy.py
Created December 23, 2015 06:59
写一个简单的 HTTP 代理服务器
#!/usr/bin/env python
# coding: utf-8
import socket
import sys
from thread import *
try:
listening_port = int(raw_input("[*] Enter Listening Port Number: "))
except KeyboardInterrupt:
print("\n[*] User Requested An Interrupt")
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>w3cschool Home Page</title>
<link>http://www.w3cschool.cc</link>
<description>Free web building tutorials</description>
<item>
<title>RSS Tutorial</title>
<link>http://www.w3cschool.cc/rss</link>
@binderclip
binderclip / hello_basic_auth.py
Created January 25, 2016 07:24
basic auth demo - with flask
# coding: utf-8
from functools import wraps
from flask import request, Response, Flask
def check_auth(username, password):
"""This function is called to check if a username /
password combination is valid.
"""