reference: https://www.youtube.com/watch?v=e0CAbRVYAWg
function fibonacci(n) {
if (n === 1 || n === 2) {
return 1
}
let seq = []
seq[0] = seq[1] = 1
let end = n - 1| server { | |
| listen 80; | |
| server_name example.com; # 指向你的网址 | |
| resolver 223.5.5.5 208.67.222.222 8.8.8.8 valid=300s; | |
| resolver_timeout 10s; | |
| add_header X-Cache $upstream_cache_status; | |
| location / { | |
| proxy_pass http://127.0.0.1:8080; # frp 默认使用了 8080 端口 | |
| proxy_redirect http://$host/ http://$http_host/; | |
| proxy_set_header X-Real-IP $remote_addr; |
| import { of } from 'rxjs' | |
| import rxwx from 'rxjs6-wx' | |
| import environment from '../environment' | |
| import store from '../store' | |
| // 假数据 | |
| import user from '../fixtures/user' | |
| export default class ApiService { | |
| constructor() { |
| /** | |
| * 跳转到地图导航界面 | |
| * http://lbsyun.baidu.com/index.php?title=uri/api/android | |
| * https://developers.google.com/maps/documentation/urls/guide#directions-action | |
| * @param longitude | |
| * @param latitude | |
| * @param mapAppName browser-浏览器打开, gaode-高德APP, baidu-百度APP,如果没有安装相应APP则使用浏览器打开。 | |
| * @param destination 目的地 | |
| */ | |
| export function goToOuterMapApp (longitude = 0, latitude = 0, mapAppName = 'baidu', destination = '目的地') { |
| /** | |
| * Sample React Native App | |
| * https://github.com/facebook/react-native | |
| * | |
| * @format | |
| * @flow | |
| * @lint-ignore-every XPLATJSCOPYRIGHT1 | |
| */ | |
| import React, {Component} from 'react'; |
| [SwitchyOmega Conditions] | |
| @with result | |
| *.cloudfront.net +科学上网 | |
| *.github.io +科学上网 | |
| *.githubusercontent.com +科学上网 | |
| *.4gifs.com +科学上网 | |
| *.akamaihd.net +科学上网 | |
| *.amazonaws.com +科学上网 | |
| *.android.com +科学上网 |
| # config for 3 vhost; 2 angular projects, 1 backend api project. | |
| # angular project1 | |
| # replace project1 with your own | |
| server { | |
| listen 80; | |
| server_name project1.test; | |
| access_log logs/project1.test-access.log; |
| // from: https://codepen.io/lamerumixa/pen/OxZgvO?editors=1010 | |
| var Dep = { | |
| deps: {}, | |
| target: null, | |
| subscribe: function (key) { | |
| if (!this.deps[key]) this.deps[key] = []; | |
| if (this.target && this.deps[key].indexOf(this.target) == -1) { | |
| this.deps[key].push(this.target); | |
| } |
| function httpGet(url, responseType = '') { | |
| return new Promise((resolve, reject) => { | |
| const xhr = new XMLHttpRequest() | |
| xhr.onload = function() { | |
| if (this.status === 200) { | |
| resolve(xhr.response) | |
| } else { | |
| reject(new Error(this.statusText)) | |
| } | |
| } |
reference: https://www.youtube.com/watch?v=e0CAbRVYAWg
function fibonacci(n) {
if (n === 1 || n === 2) {
return 1
}
let seq = []
seq[0] = seq[1] = 1
let end = n - 1| # 清华大学: | |
| cd "$(brew --repo)" | |
| git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git | |
| cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" | |
| git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git | |
| # 手动修改 bottles 地址: | |
| export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles | |
| # 或: |