Skip to content

Instantly share code, notes, and snippets.

View ipfans's full-sized avatar
💭
Hunting for a job

ipfans ipfans

💭
Hunting for a job
View GitHub Profile
@ipfans
ipfans / Dockerfile
Created September 15, 2024 14:28
Docerfile if you want use mysqlclient in python:3.12-slim
# syntax=docker/dockerfile:1
# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Dockerfile reference guide at
# https://docs.docker.com/go/dockerfile-reference/
# Want to help us make this template better? Share your feedback here: https://forms.gle/ybq9Krt8jtBL3iCk7
ARG PYTHON_VERSION=3.12
FROM python:${PYTHON_VERSION}-slim as base
@ipfans
ipfans / Taskfile.yml
Last active March 11, 2021 06:16
Build NATS-Server
# https://taskfile.dev
version: '3'
tasks:
default:
cmds:
- go build -o nats-server -trimpath -ldflags="-s -w -buildid=" .
env:
GOOS: linux
@ipfans
ipfans / bench.py
Created November 19, 2015 07:49
MongoEngine Beachmark on CPython 2.7.10&pypy 4.0.0
#!/usr/bin/env python
# coding=utf-8
from __future__ import absolute_import, division, print_function
import datetime
import time
from mongoengine import (DateTimeField, Document, ListField, StringField,
connect)
@ipfans
ipfans / initserver.sh
Last active January 1, 2016 21:58
初始化服务器配置
apt-get update
apt-get upgrade
groupadd www
useradd -s /sbin/nologin -g www www
mkdir -p /home/wwwroot/default
chmod +w /home/wwwroot/default
mkdir -p /home/wwwlogs
chmod 777 /home/wwwlogs
touch /home/wwwlogs/nginx_error.log
apt-get install -y mysql-server mysql-client vim