Skip to content

Instantly share code, notes, and snippets.

@hardywu
hardywu / ad_urls.json
Created September 9, 2023 14:50 — forked from youfou/ad_urls.json
响应好友请求 / 自动聊天 / 限制频率 / 邀请入群 / 远程群管理 / 新人欢迎消息 / 关键词问答 / 发心跳 / 远程命令 / 远程执行代码
{
"xiaohongshu.com": "小红书",
"vip.com": "唯品会",
"douguo.com": "豆果美食",
"youshu.cc": "有书",
"missfresh.cn": "每日优鲜",
"qnr.io": "去哪儿",
"kaola.com": "网易考拉",
"waimai.meituan.com": "美团外卖",
"qcs.meituan.com": "美团打车",
@hardywu
hardywu / puma_rails.service
Created March 15, 2021 04:24
Puma HTTP Server for ruby on rails
[Unit]
Description=Puma HTTP Server for rails (staging)
After=network.target
[Service]
Type=simple
User=deploy
WorkingDirectory=/home/deploy/apps/myApp/current
Environment=RBENV_ROOT=$HOME/.rbenv
ExecStart=/home/deploy/.rbenv/shims/bundle exec puma -C /home/deploy/apps/myApp/shared/puma.rb
@hardywu
hardywu / nginx.conf
Created September 26, 2019 15:11 — forked from Stanback/nginx.conf
Example Nginx configuration for serving pre-rendered HTML from Javascript pages/apps using the Prerender Service (https://github.com/collectiveip/prerender).Instead of using try_files (which can cause unnecessary overhead on busy servers), you could check $uri for specific file extensions and set $prerender appropriately.
# Note (November 2016):
# This config is rather outdated and left here for historical reasons, please refer to prerender.io for the latest setup information
# Serving static html to Googlebot is now considered bad practice as you should be using the escaped fragment crawling protocol
server {
listen 80;
listen [::]:80;
server_name yourserver.com;
root /path/to/your/htdocs;
@hardywu
hardywu / nginx.conf
Created September 20, 2019 05:22 — forked from thoop/nginx.conf
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
@hardywu
hardywu / chenpay.rb
Last active April 9, 2019 16:38
chenpay ruby version
require 'date'
require 'faraday'
require 'faraday_middleware'
class Job
# queue_as :default
attr_accessor :cookie
@cookie = false
def con
@hardywu
hardywu / Dockerfile
Created November 10, 2018 16:41
Development Environment in Docker
FROM ubuntu:18.04
MAINTAINER Hardy Wu 'hardy0wu@gmail.com'
# Update APT mirrors
RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
RUN apt-get update && apt-get install -y curl bash git gnupg zlib1g-dev sudo vim build-essential ruby ruby-dev ruby-bundler
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
[Unit]
Description=Shadowsocksr-Server: a proxy server
After=network.target
[Service]
Type=forking
PIDFile=/run/shadowsocksrd.pid
WorkingDirectory=/root/shadowsocks
ExecStart=/root/shadowsocks/server.py
Restart=always
2015-05-11 02:21:51 -0400
./configure
--disable-debug
--prefix=/Users/hardy/local/Cellar/postgresql/9.4.1_1
--datadir=/Users/hardy/local/Cellar/postgresql/9.4.1_1/share/postgresql
--docdir=/Users/hardy/local/Cellar/postgresql/9.4.1_1/share/doc/postgresql
--enable-thread-safety
--with-bonjour
--with-gssapi
@hardywu
hardywu / t.rb
Created October 31, 2014 20:38
dcf
https://slack-files.com/files-pub/T02HN3AC9-F02SRGE8E-0aa045/lunchbox-v3.png
@hardywu
hardywu / bash_profile
Created September 23, 2014 17:55
bash codes to color terminal fonts
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'