狂人居

路漫漫其修远兮,吾将上下而求索


  • 首页

  • 分类

  • 归档

  • 标签

  • development

  • resume

  • 搜索

React + Electron 搭建一个桌面应用[转]

发表于 2018-11-29 | 分类于 前端 |
字数统计: 2,192 字 | 阅读时长 ≈ 9 分钟

当你冲这个标题点进来的时候,我猜你一定知道 React 是什么,更多详情请戳这里,就不介绍React了,一个神般存在的前端框架。另外,浏览器和移动端横行的时代,为什么还需要桌面应用?我就不解释了,反正优点很多,做为技术多学一点总没错。

Electron 简单介绍

是什么?

官网是这么介绍的:

Electronis an open source library developed by GitHub for building cross-platform desktop applications with HTML, CSS, and JavaScript. Electron accomplishes this by combining Chromiumand Node.jsinto a single runtime and apps can be packaged for Mac, Windows, and Linux.

简单翻译一下就是:

​Electron是一个由 GitHub 开发的开源库,通过将 Chromium) 和Node.js组合并使用 HTML,CSS 和 JavaScript 进行构建 Mac,Windows,和 Linux 跨平台桌面应用程序。

隐藏意思:

让前端开发者快乐简单拥抱桌面应用!

阅读全文 »

广东人真是太太太太太好玩了

发表于 2018-11-28 | 分类于 live |
字数统计: 0 字 | 阅读时长 ≈ 1 分钟


阅读全文 »

gogs开启ssh支持

发表于 2018-08-15 | 分类于 server |
字数统计: 179 字 | 阅读时长 ≈ 1 分钟

已经通过docker安装了gogs,http能正常使用,ssh不能使用

gogs配置app.ini

1
2
3
4
5
6
7
8
9
10
11
12
[server]
DOMAIN = xxx
HTTP_PORT = 3000
ROOT_URL = http://xxx:13000/
DISABLE_SSH = false
SSH_DOMAIN = xxx:10022
SSH_PORT = 22
START_SSH_SERVER = false
SSH_LISTEN_PORT = 10033
SSH_ROOT_PATH = /home/git/.ssh
OFFLINE_MODE = false
REWRITE_AUTHORIZED_KEYS_AT_START = false

docker

ssh的配置文件路径
/app/gogs/docker/sshd_config
通过下面命令可以获得

1
ps aux

设置目录权限

1
2
chmod 0777 /data/git/.ssh
chmod 0600 /data/git/.ssh/authorized_keys

在后台/管理面板执行

重新生成 ‘.ssh/authorized_keys’ 文件(警告:不是 Gogs 的密钥也会被删除)

重启ssh服务

1
2
$ service ssh restart
$ exit

重新登录

1
ssh -p 10022 git@xxx

git clone格式

1
ssh://git@xxx:10022/jabin/myproject.git

copy ssh-key

1
pbcopy < ~/.ssh/id_rsa.pub

mac下安装pyside2

发表于 2018-08-08 | 分类于 python |
字数统计: 202 字 | 阅读时长 ≈ 1 分钟

环境:mac已经安装了python3.5,pip3.5
IDE:PyCharm

安装pyside2

1
pip3.5 install --index-url=http://download.qt.io/snapshots/ci/pyside/5.9/latest/ pyside2 --trusted-host download.qt.io

简单实例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/python
# -*- coding: utf-8 -*-

# 1st.py

import sys
from PySide2 import QtGui
from PySide2 import QtWidgets

app = QtWidgets.QApplication(sys.argv)

wid = QtWidgets.QWidget()
wid.resize(250, 150)
wid.setWindowTitle('Simple')
wid.show()

sys.exit(app.exec_())


阅读全文 »

家庭数据中心

发表于 2018-04-22 | 分类于 tools |
字数统计: 771 字 | 阅读时长 ≈ 3 分钟

私人数据越来越多(如照片),网盘越来越小,并且不是关闭就是被墙。决定搭建自己的家庭数据中心。
WechatIMG156

计划&预算

  • 硬件:群晖218+(加一条8g内存),希捷酷狼4T*2,玩客云,希捷移动硬盘2T(玩客云用),4T(群晖用)各一个,小米盒子国际版,斐讯k2p路由器(刷官改rom)
  • 预算:8k
  • 目的:数据备份,家庭影视
    其实黑群也可以,价格更便宜。最好4盘位,2盘位还是少了点。
    阅读全文 »
12…6
jabin

jabin

29 日志
11 分类
26 标签
© 2015 — 2018 jabin
由 Hexo 强力驱动
|
主题 — NexT.Pisces v5.1.4
粤ICP备17022455号-1
粤ICP备17022455号-2