Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

ryanlid ryanlid

Block or report user

Report or block ryanlid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ryanlid
ryanlid / youtube-dl.md
Last active May 23, 2019
youtube-dl 下载设置代理
View youtube-dl.md

socks5代理

youtube-dl --proxy socks5://127.0.0.1:1080 https://www.youtube.com/watch?v=6_gLU_OStK0

http代理

youtube-dl --proxy http://127.0.0.1:8118 https://www.youtube.com/watch?v=6_gLU_OStK0
@ryanlid
ryanlid / monitor.sh
Last active Feb 8, 2018
监控页面,如果访问出错,重启docker
View monitor.sh
#!/bin/sh
# 注意权限,如果docker是root用户运行,运行此个脚本也需要root用户运行
# 自己定义要监控的页面地址,页面越简单越好,比如:页面上写个success即可
# 这个链接是wordpress安装页面,如已安装,将显示提示页面,页面内容少,仅1.1k大小
WebUrl=https://lidong.me/wordpress/wp-admin/install.php
# 日志输出 (自己定义地址,用于输出监控日志和监控报错日志)
@ryanlid
ryanlid / .bash_profile
Last active May 23, 2019
~/.bashrc ~/.bash_profile
View .bash_profile
# ~/.bash_profile
export JAVA_HOME=$(/usr/libexec/java_home)
export ANDROID_HOME=/Users/ryan/Library/Android/sdk
export ANDROID_HOME=/Volumes/Extend/Library/Android/sdk
export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles
export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
export NVM_IOJS_ORG_MIRROR=https://npm.taobao.org/mirrors/iojs
View xcode 下载.md

xcode9

https://download.developer.apple.com/Developer_Tools/Xcode_9/Xcode_9.xip

或者

登录开发者帐号获取最新版本下载地址

@ryanlid
ryanlid / docker-cleanup.sh
Created Jan 21, 2018
macOS中删除docker所有的images,containers,及其其他数据,以恢复磁盘空间。
View docker-cleanup.sh
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker volume rm $(docker volume ls |awk '{print $2}')
rm -rf ~/Library/Containers/com.docker.docker/Data/*
@ryanlid
ryanlid / .vimrc
Created Jan 16, 2018
vim 配置文件
View .vimrc
"引号为注释
"设置显示行号
set nu
"设置在命令行界面最下面显示当前模式
set showmode
"在右下角显示光标所在的行数等信息
set ruler
"设置每次单击Enter键后,光标移动到下一行时与上一行的起始字符对齐
set autoindent
"设置TAB宽4个空格
@ryanlid
ryanlid / pip.conf
Last active Jan 16, 2018
python 配置文件
View pip.conf
# ~/.pip/pip.conf
index-url = https://mirrors.ustc.edu.cn/pypi/web/simple
# index-url = https://pypi.douban.com/simple
@ryanlid
ryanlid / .cnpmrc
Last active Apr 20, 2018
nodejs相关的配置文件
View .cnpmrc
registry=https://registry.npm.taobao.org
#registry=https://npmreg.mirrors.ustc.edu.cn
@ryanlid
ryanlid / .htaccess
Created Jan 9, 2018
wordpress .htaccess setting
View .htaccess
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
@ryanlid
ryanlid / nginx.conf
Created Jan 6, 2018
nginx跨域配置
View nginx.conf
location / {
root /var/www/lidong.me/www;
index index.html index.htm index.php;
# 配置允许cors跨域
if ($http_origin ~ '^https?://(lidong.me)') {
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
}
}
You can’t perform that action at this time.