Skip to content

Instantly share code, notes, and snippets.

View Darmody's full-sized avatar
🎤

Cai Huanyu Darmody

🎤
View GitHub Profile
##GIST

HELLO RASPBERRY

树莓派拿到手,第一步当然就是要插进去!

用正常的体位肯定没什么意思了,我要说的是没有显示屏,没有路由器,只有一根网线的高难度体位!

需要准备什么?

  • 树莓派一只
  • 电源以及sd卡
  • 一根网线
@Darmody
Darmody / ap_raspberry.md
Last active August 29, 2015 14:14
ap_raspberry

AP RASPBERRY

树莓派刚刚到手,不知道要玩的什么,硬件又玩不熟,肯定得先拿软件层面的开发入手。刚好家里缺一个路由,啊哈哈哈哈,需求确定!

这里我只是实现了功能,并没有进一步优化,稳定性是不能保障滴!

设置静态IP

执行 sudo vi /etc/network/interfaces,注释掉无线网络的配置:

#allow-hotplug wlan0

Tesseract Training

业务需求用到了OCR技术,Tesseract因为是开源项目又是google推的,自然成为了比较好的选择

这货国内的文档少,在网上被网友坑了几圈后决定自己留份文档看!被我坑的不要怪我咯。

直接来训练

安装配置什么的问题自行Google,我tm要直接从训练开始写!其实官方的文档差不多就够了,但是有一些典型的问题google都找不到答案。貌似这个项目没有在好好维护啊,所以还是自己来吧。

首先准备好训练集

Intro

The plan is to create a pair of executables (ngrok and ngrokd) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok to connect to this ngrokd, and vice versa.

DNS

Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com, you'll need a record for that and for *.domain.com.

Different Operating Systems

@Darmody
Darmody / gist:2c405e930b7e3a54f13a
Last active August 29, 2015 14:23
underscore.md
//     Underscore.js 1.8.3
//     http://underscorejs.org
//     (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
//     Underscore may be freely distributed under the MIT license.

(function() {

  // Baseline setup
  // --------------
/**
* 1) fetch data inside useEffect violate "Render-as-You-Fetch", we should start fetching early.
* 2) fetchUserProfile do not implement as Suspense required, it should work like relay.
* 3) Suspense do not have a fallback, it violate the concurrent UI Patterns.
*/
import React, { Suspense } from "react";
import ReactDOM from "react-dom";
function fetchUserProfile(userId) {