hexo常用命令笔记

hexo 皮肤Github

hexo 皮肤预览

hexo

1
npm install hexo -g #安装  
npm update hexo -g #升级  
hexo init #初始化

简写


hexo n "我的博客" == hexo new "我的博客" #新建文章

hexo p == hexo publish

hexo g == hexo generate #生成

hexo s == hexo server #启动服务预览

hexo d == hexo deploy #部署

服务器


hexo server #Hexo 会监视文件变动并自动更新,您无须重启服务器。

hexo server -s #静态模式

hexo server -p 5000 #更改端口

hexo server -i 192.168.1.1 #自定义 IP

hexo clean #清除缓存 网页正常情况下可以忽略此条命令

hexo g #生成静态网页

hexo d #开始部署

监视文件变动

hexo generate #使用 Hexo 生成静态文件快速而且简单

hexo generate --watch #监视文件变动

完成后部署

1
两个命令的作用是相同的
`hexo generate --deploy`
`hexo deploy --generate`

hexo deploy -g

hexo server -g

草稿


hexo publish [layout] <title>

模板


hexo new "postName" #新建文章

hexo new page "pageName" #新建页面

hexo generate #生成静态页面至public目录

hexo server #开启预览访问端口(默认端口4000,’ctrl + c’关闭server)

hexo deploy #将.deploy目录部署到GitHub

hexo new [layout] <title>

hexo new "Hello World" --lang tw

变量 描述
layout 布局
title 标题
date 文件建立日期
1
title: 使用Hexo搭建个人博客
layout: post
date: 2014-03-03 19:07:43
comments: true
categories: Blog
tags: [Hexo]
keywords: Hexo, Blog
description: 生命在于折腾,又把博客折腾到Hexo了。给Hexo点赞。

有关不对称战斗

这个世界不存在绝对的对称战斗

放弃幻想吧,战斗只有输赢,不存在对称、公平、美好等理想词汇

合理地发挥所长,取得胜利,这才是真正要考虑的

最近在playground上得demo code

如题

1
let names = ["aleige","cdameng","bhouzi"]
var reversed = (names, { (firstString: String, secondString: String) -> Bool in
    return firstString > secondString
})

reversed = (names, >)


reversed = (names, { firstString, secondString in return firstString > secondString})

reversed = (names, { firstString, secondString in firstString > secondString})

reversed = (names, { $0 > $1 })

reversed = (names, >)



var odds = [Int]()
for i in 1...10 {
    if i % 2 == 1 {
        odds.append(i)
    }
}

print(odds)

odds = Array(1...10).filter { $0 % 2 == 1 }
print(odds)


func plusAandB(a:Int) (b:Int) -> Int {

    return a+b
}

let plusFive = plusAandB(5)
let plusTen = plusFive(b: 10)

let plus11 = plusFive(b: 11)

print(plus11)

//var
//let

var array = [1,2,3,4,5]

func minMax(array: [Int]) -> (min:Int, max:Int) {
    
        var currentMin = array[0]
        var currentMax = array[0]
        
        for value in array[1..<array.count] {
                if value < currentMin {
                        currentMin = value
                }else
                    if
                        value > currentMax {
                            currentMax = value
                }
        }
    
        return(currentMin, currentMax)
}

print(minMax(array))
print(minMax(array).max)
print(minMax(array).min)




func averageNumbers(numbers:Double...) -> Double
{
    
    var total:Double = 0
    
    for number in numbers {
            total += number
    }
    
    return total / Double(numbers.count)
}

//inout
// _

func swapTwoInts(inout a: Int, inout b: Int) {
    let temporaryA = a
    a = b
    b = temporaryA
}

var someInt = 3
var anotherInt = 107

swapTwoInts(&someInt,b: &anotherInt)
print("someInt is now \(someInt), and anotherInt is now \(anotherInt)")

func chooseSayHelloFunction(lang: String) -> (String) -> String{
    
    func sayHelloInChinese(name: String) ->String{
        return "你好 "+name
    }
    
    func sayHelloInEnglish(name: String) -> String{
        return "hello "+name
        
    }
    return lang == "cn" ? sayHelloInChinese: sayHelloInEnglish
}

let sayHelloInChinese = chooseSayHelloFunction("cn")
print(sayHelloInChinese("d哆啦A梦"))


func swapTwoValues<T>(inout a: T, inout b: T) {
    let temporaryA = a
    a = b
    b = temporaryA
}

var aString = "a"
var bString = "b"

swapTwoValues(&aString,b: &bString)
print("aString is now \(aString), and bString is now \(bString)")


var aInt = 55
var bInt = 99

swapTwoValues(&aInt,b: &bInt)
print("aInt is now \(aInt), and bInt is now \(bInt)")

by peixl

有关《MakTalk 跨越边界》

电子书与实体书

曾读过卖桃君的《MacTalk 人生元编程》,深有感悟,起先读的是纸质实体书,然几次搬家周转,已然不知去向,在多看阅读看到有电子书,购买收藏之。

反复几次,发现每次都是阅读实体书,再买电子书收藏,为何不能直接买电子版,越过实体书中间环节那?

从那一天起,开始拒绝纸质实体书,而只选电子版,等到《MakTalk 跨越边界》2015年12月发售,直到2016年中旬还是没发版电子版,于是有了如下对话:

1
我:池老师,新书为啥不出电子版,另外帮我问问吴军博士,我想买他的《大学之路》,也没得买。
池:吴军从来不出电子版。跨越边界目前没有电子版规划,但应该会出。
我:习惯读电子书,实体书不方便携带那。
池:所以,我对你的建议是,别挑。你只读电子版,那就会错过很多好书,这是你的损失,而不是作者的损失。
我:还是想等电子版那。
池:那你就等着吧。

好吧,你就等着吧,彻底被打败了。

于是,在亚马逊下单,购买 《MakTalk 跨越边界》《大学之路》《数学之美(第二版)》

iOS技能图谱

编程语言

  • Swift
  • Objective-C
  • C++/C
  • JavaScript

操作系统

  • Mac OSX
  • iOS
  • Watch OS
  • tvOS
  • Linux常用命令

开发基础

  • UI控件
  • Storyboard & Xib
  • Core Data & Sqlite
  • Core Graphics
  • Core Text
  • Animation
  • Block & GCD
  • Test Case编写
  • Framework
  • Autolayout
  • 手势识别,重力感应

开发进阶

  • 引用计数
  • Runtime
  • Runloop
  • 对象模型
  • Hybrid
  • 沙盒机制
  • AVFoundation
  • 逆向与安全

设计模式

  • MVC
  • MVVM
  • 通知
  • 代理
  • KVO
  • 工厂模式
  • 命令模式

函数式编程

  • ReactiveCocoa
  • RxSwift

开发工具

IDE

- Xcode
- AppCode

调试工具

- Charles
- Reveal
- Instruments

插件

- Alcatraz
- VVDocument
- XVim
- FuzzyAutocompletePlugin
- KSImageNamed-Xcode

辅助工具

- xScope
- ImageOptim
- 马克鳗
- Dash
- Deploymate

命令行工具

- Xcodebuild
- nomad
- xctool
- fastlane

开源项目

  • AFNetworking & Alamofire
  • Masonry
  • SDWebImage
  • SwiftyJSON

包管理

  • CocoaPods
  • Carthage
  • Swift Package Manager

App打包上传与审核

  • Apple Developer网站
  • itunes connect网站
  • IAP
  • 加急审核申请
  • 打包脚本

第三方服务

  • 崩溃收集
    • Bugly
    • Crashlytics
    • BugHD
  • 数据统计
    • Google Analytics
    • 友盟
    • MTA
    • Flurry
  • 应用分发
    • 蒲公英
    • FIR