Skip to content

Instantly share code, notes, and snippets.

View july-12's full-sized avatar
💭
I may be slow to respond.

Faith july-12

💭
I may be slow to respond.
View GitHub Profile
# As root user
sudo su
# Update the OS
apt-get update -y
# Add this to ~/.bashrc to remove timezone warnings
export LC_ALL="en_US.UTF-8"
source ~/.bashrc
@july-12
july-12 / gitconfig
Created December 23, 2013 09:01
git config
[user]
name = Tanyb
email = [email protected]
[core]
editor = vim
[alias]
ci = commit -a -v
co = checkout
st = status
br = branch
@july-12
july-12 / server.conf
Created December 8, 2016 06:29 — forked from nkt/server.conf
Nginx configuration for separated frontend and backend endpoints
upstream example-webpack {
server 127.0.0.1:8080;
}
upstream example-backend {
server 127.0.0.1:3000;
}
server {
listen 80;
upstream backend {
server localhost:5000;
}
server {
listen 80;
listen [::]:80;
root /var/www/client/build;
index index.html index.htm index.nginx-debian.html;
apt-get update
apt-get install -y
## Add this to ~/.bashrc to remove timezone warnings
export LC_ALL="en_US.UTF-8"
source ~/.bashrc
@july-12
july-12 / .gitignore
Created September 19, 2018 02:20 — forked from ericelliott/.gitignore
Sample Node project .gitignore
node_modules
build
npm-debug.log
.env
.DS_Store
@july-12
july-12 / vim_cheatsheet.md
Created December 26, 2019 03:07 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@july-12
july-12 / replace homebrew mirrors
Last active January 2, 2020 03:31
替换homebrew镜像源
当我们brew update或者brew install xxx时,异常的慢,本事原因还是国内网络环境github下载慢导致。
我们可以更换Homebrew源, 从https://mirrors.ustc.edu.cn/上搜索各对应的源
cd "$(brew --repo)" (正常放置在/usr/local/Homebrew)
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git/
# 替换homebrew-core
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git/
@july-12
july-12 / powerlevel9k
Created January 2, 2020 11:43
powerlevel9k
POWERLEVEL9K_MODE=nerdfont-complete
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_RPROMPT_ON_NEWLINE=true
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
POWERLEVEL9K=truncate_beginning
POWERLEVEL9K_TIME_BACKGROUND=black
POWERLEVEL9K_TIME_FOREGROUND=white
POWERLEVEL9K_TIME_FORMAT=%D{%I:%M}
POWERLEVEL9K_STATUS_VERBOSE=false
POWERLEVEL9K_VCS_CLEAN_FOREGROUND=black
参考 https://mirror.tuna.tsinghua.edu.cn/help/CocoaPods/
对于旧版的 CocoaPods 可以使用如下方法使用 tuna 的镜像:
```
$ pod repo remove master
$ pod repo add master https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
$ pod repo update
```
新版的 CocoaPods 不允许用pod repo add直接添加master库了,但是依然可以: