Skip to content

Instantly share code, notes, and snippets.

View Jiang-Xuan's full-sized avatar
😀
Hi~ o(* ̄▽ ̄*)ブ

蒋璇 Jiang-Xuan

😀
Hi~ o(* ̄▽ ̄*)ブ
  • Hangzhou Zhejiang
View GitHub Profile
@Jiang-Xuan
Jiang-Xuan / mac-plist-踩坑.md
Created November 26, 2017 15:25
mac plist 踩坑

执行命令

<key>ProgramArguments</key>
<array>
  <string>/Users/jiangxuan/loveTech/gfw-microservices/src/plist/script.sh</string>
</array>

这里的片段指定了 我们要执行的脚本

@Jiang-Xuan
Jiang-Xuan / 将远程不存在的本地远程分支删除掉.md
Created November 23, 2017 06:46
将远程不存在的本地远程分支删除掉

将远程不存在的本地远程分支删除掉

[协作者]

git checkout -b hotfix-xxx
git push origin hotfix-xxx
# ... 开发完成
git push origin :hotfix-xxx
@Jiang-Xuan
Jiang-Xuan / set-wallpaper.sh
Created November 21, 2017 09:05 — forked from willurd/ set-wallpaper.sh
Set the Desktop Background for all of your open Spaces in Mountain Lion
read -e IMAGE;
defaults write com.apple.desktop Background "{default = {ImageFilePath='$IMAGE'; };}"
killall Dock
@Jiang-Xuan
Jiang-Xuan / 切换mac桌面背景.sh
Created November 21, 2017 07:27
切换mac桌面背景
#提取壁纸图片URL
url=$(expr "$(curl http://cn.bing.com/?mkt=zh-CN |grep g_img)" : ".*g_img={url: \"\(.*\)\",id.*")
#去除url中的斜杠“\”
url="http://cn.bing.com${url//\\/}"
#提取图片名称
filename=$(expr "$url" : ".*/\(.*\)")
#本地图片地址-当前用户下缺省图片目录
localpath="/Users/$USER/Pictures/$filename"
#下载图片至本地
curl -o $localpath $url
@Jiang-Xuan
Jiang-Xuan / 让伪元素箭头和content的阴影保持一致.md
Last active November 30, 2017 11:05
如何让伪元素箭头和content的阴影保持一致?
@Jiang-Xuan
Jiang-Xuan / modify.js
Last active November 16, 2017 03:29
topNav 修改
homeButton: {
name: '首页',
url: 'http://xxxx',
icon: 'home',
key: 'home',
active: false
},
helpCenter: {
helpCenterUrl: '' // 帮助中心的链接
},
@Jiang-Xuan
Jiang-Xuan / upgradegit.sh
Created November 15, 2017 15:30
更新 centos 7 的 git 版本
# 安装源
yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm
# 更新 或者是 install git
yum update git
@Jiang-Xuan
Jiang-Xuan / left-and-inline-block.md
Created November 15, 2017 10:09
float: left 和 display: inline-block

float: left 和 display: inline-block 的区别

场景一

最常见的导航栏用ul>li的结构

<ul>
  <li>一致性评价</li>
 申报进度

Using ngrok

First, we'll install a program to expose our local host to the Internet. We'll use ngrok to do this. ngrok is a free download available for all major operating systems.

When you're done with that, you can expose your localhost by running ./ngrok http 4567 on the command line. You should see a line that looks something like this:

Forwarding    http://7e9ea9dc.ngrok.io -> 127.0.0.1:4567

pm2 启动的时候 nodejs 的环境和当前的 nodejs 环境不一致

update                                               (alias) update in-memory PM2 with local PM2

需要用 pm2 update 来刷新内存里面的 pm2

这样的场景通常是因为用了低版本的 nodejs 启动程序, 改代码之后需要用到高版本的特性, 这时候不能用 pm2 restart process.yml 来重启程序.