Skip to content

Instantly share code, notes, and snippets.

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

clip binderclip

👨‍💻
build
  • Singapore
View GitHub Profile
@binderclip
binderclip / play.md
Last active September 18, 2015 11:05
play use curl
@binderclip
binderclip / atom-and-python.md
Created September 14, 2015 12:50
use atom for python coding

自动补齐

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

代码检查(使用 Flake)

@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 / 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 / mysql-installation-ready-to-hand-on-mac.md
Last active September 19, 2020 08:52
MySQL Installation on Mac

MySQL 安装和上手使用 on Mac

安装

之前看 MySQL 的入门教程的时候发现不是很容易找到和自己环境完全一样的方法,后来问同事,作比较终于走通了。安装方法不只是一种,用的相关 APP 也不是一种,每种都是可行的,但是这里只描述自己更偏好的那一种 :D。这篇文章假设读者开始对 MySQL 都没有一个概念,所以除了软件的安装和配置,还会简单介绍一点点关于 MySQL 的东西。

首先 $ brew install mysql 安装 mysql,之后可能需要重启一下终端,然后成功的话输入 $ mysql 再按 Tab 会提示一些和 mysql 相关的命令出来,如果有的话就 OK 了,如下:

$ mysql
@binderclip
binderclip / try-to-use-demo.md
Created August 22, 2015 15:20
所有的 try-to-use-xxx 的一个思路

背景

常用操作备份

快速上手

更多了解

原理了解

试着去使用 rync

@binderclip
binderclip / flask-mail-qq.py
Created August 4, 2015 07:48
用 Flask-Mail 通过 QQ 邮箱发送邮件
from flask import Flask
from flask_mail import Mail, Message
app = Flask(__name__)
app.config.update(
#EMAIL SETTINGS
MAIL_SERVER='smtp.qq.com',
MAIL_PORT=465,
MAIL_USE_SSL=True,
@binderclip
binderclip / python-smtp-send-qq-mail.py
Last active February 16, 2023 14:59
Python & Email,附上用 Python 发送 QQ 邮箱邮件的代码
import smtplib
from getpass import getpass
def prompt(prompt):
return input(prompt).strip()
fromaddr = prompt("From: ")
toaddrs = prompt("To: ").split()
subject = prompt("Subject: ")
print("Enter message, end with ^D (Unix) or ^Z (Windows):")
@binderclip
binderclip / ios_create_empty_prj
Created March 25, 2015 08:08
iOS 创建空工程,不使用 Storyboard
// First Config: target -> general -> Deployment Info -> Main Interface (Clear!)
// Then can move the Main.storyboard
// Only ViewController
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
ViewController *viewController = [[ViewController alloc] init];
self.window.rootViewController = viewController;
[self.window makeKeyAndVisible];
// With Navigation Controller