Tmirun blog

  • Home

  • Archives

Typescript 笔记

Posted on 2017-01-22 | Edited on 2018-12-04 | In Typescript

参考中文文档

Read more »

REST FULL 笔记

Posted on 2016-12-10 | Edited on 2019-01-21 | In Javascript

这里是一个简单的 RESTful api 的例子.

参考:

阮一峰的网络日志: RESTful API 设计指南

阮一峰的网络日志: 理解RESTful架构

主要用 Plurar 复数

Read more »

命名规则

Posted on 2016-11-07 | Edited on 2018-10-17 | In uncategorized

比如我们的项目叫 test proyect

#CSS:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* 
属于项目的样式用项目的名字开头.
以防和加载的样式重叠.
*/
.tp-text-info{}

/*
页面
*/
#page-name{}

/*
页面里的元素
*/
#page-name-component-name{}

OpenGL教程1:打开一个窗口

Posted on 2016-11-06 | Edited on 2018-10-17 | In uncategorized
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// GLFW

#include <iostream>
#include <GLFW/glfw3.h>

int main(int argc, const char * argv[]) {

//初始glfw
glfwInit();

//glfw 设置
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);

// only in mac
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);

// 建立一个窗口
GLFWwindow* window = glfwCreateWindow(800, 600, "LearnOpenGL", nullptr, nullptr);
if (window == nullptr)
{
std::cout << "Failed to create GLFW window" << std::endl;
glfwTerminate();
return -1;
}

// 上下文
glfwMakeContextCurrent(window);


while(!glfwWindowShouldClose(window))
{
glfwPollEvents();
glfwSwapBuffers(window);

}


glfwTerminate();
return 0;
}

OpenGL教程0

Posted on 2016-10-30 | Edited on 2018-10-17 | In uncategorized

安装

这个笔记基于下面的教程
http://www.opengl-tutorial.org/cn/

Read more »

hexo简单教程

Posted on 2016-10-24 | Edited on 2018-10-17 | In Hexo

创建一个博客

1
2
3
4
hexo init "博客名字"

如果你已经创建好blog
hexo

布局

hexo 里面有三种布局:

  • draft: 草稿, 文件夹: /source/_drafts
  • post: 文章, 文件夹: /source/_posts
  • page: 网页, 文件夹: /source/_pages

创建文章

1
2
3
hexo new "post name"
或者
hexo new post "post name"

创建草稿和发布

有一些文章你正在写不希望现在显示出来的可以放到 draft 里. 等写好了在公布出去.

1
2
3
4
5
6
7
8
9
10
创建
hexo new draft "article name"

发布: 这条命令会吧 /source/_drafts 里面的文件, 导入到 post 里面.

hexo publish "article name";

!注意这里 "artcile name", 比如我们有一篇文章叫hexo简单教程,执行
hexo publish hexo
他会把 hexo简单教程 标题 换成 hexo

创建页面

1
hexo new page "page name"

Scaffolds TODO

命令

1
2
3
4
5
6
7
8
9
10
11
12
13
14
创建hexo
hexo init

清除缓存
hexo clean

启动服务器
hexo s 或者 Hexo server

生成静态网页
hexo g 或者 hexo generate

部署网页
hexo d 或者 hexo deploy

其他工具

优化 hexo seo

(原文)[https://www.jianshu.com/p/c20bb9df1867]

生成 sitemap

Sitemap即网站地图,它的作用在于便于搜索引擎更加智能地抓取网站。最简单和常见的sitemap形式,是XML文件,在其中列出网站中的网址以及关于每个网址的其他元数据

1
2
npm install hexo-generator-sitemap --save
npm install hexo-generator-baidu-sitemap --save

gulp常用命令

Posted on 2016-10-24 | Edited on 2018-10-17 | In web
  • main-bower-files: 获取bower 文件里面的主要 js

  • gulp-angular-filesort 自动加载 angular 组件 (和gulp-inject 一起用)

  • gulp-bytediff: 统计文件大小的工具

  • gulp-babel: 转换 ecmascript 版本

  • gulp-concat: 合并文件

  • gulp-inject: 自动加载css 和 js文件到index.html里面

  • gulp-load-plugins: 自动加载 package.json 里面的 gulp 插件

  • gulp-print:打印 stream 里面的文件,在调试的时候可能会特别需要

  • gulp-rev: 给文件添加hash标签: unicorn.css → unicorn-d41d8cd98f.css

  • gulp-uglify: 压缩 javascript 文件

  • gulp-useref: 把index.html文件里面的css 或者 js 合成一个文件

  • yargs: (不是gulp专属的) 来获取命令里的参数

  • wiredep: 自动加载bower 里的css 和 js

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//browserSync Example:

//can acept arguments gulp serve --f index.html
gulp.task('serve', function(){

var index = argv.f || 'index.html';
console.info('watch file: '+ index);
browserSync.init({
server: {
baseDir: "./test",
index: index
},
files: [
'css/*.css',
'js/*.js'
]
});
});

Agile Scrum

Posted on 2016-09-21 | Edited on 2018-10-17 | In uncategorized

Scrum 是一种软件敏捷开发的方式

Read more »

RGB 彩虹函数

Posted on 2016-01-09 | Edited on 2018-10-17 | In Javascript

这个函数用于彩虹RGB生成 [0-255, 0-255, 0-255]

Read more »
1…34

Tmirun

39 posts
17 categories
34 tags
© 2019 Tmirun
Powered by Hexo v3.8.0
|
Theme – NexT.Muse v6.5.0