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 / 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