Skip to content

Instantly share code, notes, and snippets.

View bookiu's full-sized avatar
👨‍💻
Coding hard

yaxin bookiu

👨‍💻
Coding hard
View GitHub Profile
@bookiu
bookiu / Surfingkeys.conf.js
Created September 27, 2024 06:46
Surfingkeys.conf.js
// an example to create a new mapping `ctrl-y`
api.mapkey('<ctrl-y>', 'Show me the money', function() {
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});
settings.blocklistPattern = /.*feishu.cn\/wiki.*|.*nowcoder.com\/practice.*|.*leetcode.cn\/problems.*|.*bytedance.larkoffice.com\/.*/i;
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
api.map('gt', 'T');
@bookiu
bookiu / multilevel-nest.go
Last active January 21, 2021 13:04
多级省市区嵌套实现
package main
func main() {
}
@bookiu
bookiu / traefik
Last active August 6, 2020 02:31
traefik init script
#! /bin/sh
### BEGIN INIT INFO
# Provides: traefik
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the traefik server
# Description: starts traefik using start-stop-daemon
@bookiu
bookiu / form.js
Created September 17, 2019 06:41
创建form表单
let action = ""
let data = {
"key": "value"
}
let form = document.createElement("form")
form.method="POST"
form.action = action
form.style = "display: none;"
@bookiu
bookiu / cookie.js
Created August 21, 2019 11:05
一句话获取cookie并转换成kv形式
@bookiu
bookiu / python3_install.sh
Last active April 24, 2017 03:33
ubuntu下编译安装python3
apt-get install -y libreadline-dev liblzma-dev libncurses5-dev libsqlite3-dev libbz2-dev zlib1g-dev libssl-dev libgdbm-dev
./configure --prefix=/usr/local/python3 --enable-shared --disable-ipv6
make -j 8
make install
echo "/usr/local/python3/lib" >> /etc/ld.so.conf.d/python3.conf
ldconfig -v
@bookiu
bookiu / font-family.css
Last active October 10, 2016 07:01
css默认字体
font-family:
/*西文*/
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, Arial,
/*中文*/
"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Source Han Sans CN", sans-serif;
color: rgb(72, 85, 93);
-webkit-font-smoothing: antialiased;
@bookiu
bookiu / ssl.conf
Created September 28, 2016 01:51
nginx https site config template
server {
listen 80;
server_name servername;
location / {
rewrite (.*) https://$host$1 permanent;
}
access_log /path/to/access.log;
error_log /path/to/error.log error;
@bookiu
bookiu / php5_install.sh
Last active April 23, 2018 12:23
Ubuntu下安装PHP5
apt-get update
apt-get install -y pkg-config libxml2-dev libssl-dev libcurl4-gnutls-dev libjpeg-dev libpng-dev libfreetype6-dev libmcrypt-dev libreadline-dev libxslt1-dev libbz2-dev
PHP_INSTALL_DIR="/usr/local/php56"
PHP_CONFIG_DIR="$PHP_INSTALL_DIR/etc"
PHP_CONFIG_SCAN_DIR="$PHP_CONFIG_DIR/php.d"
./configure \
@bookiu
bookiu / php7_install.sh
Last active February 13, 2023 05:53
Ubuntu下PHP7编译安装参数以及系统依赖库安装
wget http://cn2.php.net/distributions/php-7.2.4.tar.gz
tar zxvf php-7.2.4.tar.gz
cd php-7.2.4
# Base directory
PHP_INSTALL_DIR='/usr/local/php72'
PHP_CONFIG_DIR="$PHP_INSTALL_DIR/etc"
PHP_CONFIG_SCAN_DIR="$PHP_CONFIG_DIR/php.d"
# Dependency