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
% These are examples of Feynman Diagrams using TikZ
% Author: Flip Tanedo, 2010. pt267@cornell.edu
\documentclass[12pt]{article} % Why do I use such a boring document clas?
% THE USUAL PACKAGES
\usepackage{amsmath,amssymb,amsfonts} % DON'T use cite, screws with bibtex + hyperref
\usepackage{color}
\usepackage{amsmath}
\usepackage{amsfonts}
inputs = %w[
CollectionSelectInput
DateTimeInput
FileInput
GroupedCollectionSelectInput
NumericInput
PasswordInput
RangeInput
StringInput
TextInput
@hardywu
hardywu / loudspeaker.md
Last active December 28, 2015 04:39
A temp translation for my friend

An introduction to the physics of the loudspeaker

  1. a few concepts about the sound Sound is a sequence of waves of pressure that propagates through compressible media such as air or water. People hear the sound when it reaches their ears. Without the media to propagate the waves, there would be no sound.

  2. Three physical quantities of the waves.

    1. Amplitude(A): The amplitude of the wave
  3. Frequency(F): The number of oscillations per unit time (the frequency range that human can hear is 20-200000Hz)