某宝上买了一个小oled屏用来在树莓派上显示一些简短信息,需要开机启动,但很久才会设置一次,记下备查:
1、写个开机启动脚本,放在/etc/init.d/下,比如:/etc/init.d/minioled
#!/bin/bash # /etc/init.d/minioled ### BEGIN INIT INFO # Provides: laonan # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # …
早上收到邮件说Let's Encrypt证书自动续期失败,
参考 https://www.jianshu.com/p/d318321b93a1 这篇文章,写了个在name.com注册的域名的精简插件。
1、安装PostgreSQL 2、在settings里配置一个PostgreSQL的配置节:
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'wodedata', 'USER': 'root', 'PASSWORD': 'wodemima', 'HOST': '127.0.0.1', 'PORT': '3306', }, 'postgresql': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'wodedata', 'USER': 'psql', 'PASSWORD': 'wodemima', …新建一个model,migrate一创建外键一直不成功,一开始还以为是升级到django2.x之后的幺蛾子,后来发现是默认存储引擎的问题,原来从旧的数据库导过来的表都是MyISAM,但安装mariadb时默认是InnoDB。
在my.cnf里改成MyISAM,重启mariadb(或mysql what ever),搞定。
以前是这样的:
from django.template.loader import get_template from django.template import Context htmly = get_template('email/contact.html') d = Context({'contact': contact, 'attachments': attachments}) html = htmly.render(dt)如果异常:TypeError: context must be a dict rather than Context. …
在Google Search Console上看到公司的20多个链接显示如标题错误,比如 https://www.moorol.com/en/product/led-bulb-works-with-amazon-echo-alexa/ 是因为页面里镶嵌了一段Rich Snippet(现在叫Rich Results)的代码:
<script type="application/ld+json"> { "@context" : "http://schema.org", "@type" : "Product", "name" : "LED bulb works with Alexa, Amazon Echo", "image" : "https://www.moorol.com/media/images/product/standard/adb5127158924af696d7b3877d36abd8.jpg", "description" : …如果续期Let's Encrypt老是报如下错误:
Attempting to renew cert (laonan.net) from /etc/letsencrypt/renewal/laonan.net.conf produced an unexpected error: The manual plugin is not working; there may be problems with your existing configuration.
The …
因为Mac里的brew一下子把我的python升级到3.7还不能回滚,所以tensorflow只能安装在树莓派上。。。接下来只能用vim写tensorflow的代码了?
服务器上修改了ssh端口,本地git push被拒,查了一下,全是github上怎么改成https方式的办法。。。你们就没有人自己建git服务器吗?闲置的VPS送给我啊。。。
自己动手,丰衣足食,其实也很简单,
首先,.ssh/config里增加一段:
# gitolite server Host mygitserver HostName 111.222.11.22 Port 11111 User git然后,到项目目录下,.git/config里,修改你的IP地址或原host为:
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = …用树莓派看电影,加载srt中文字幕时老是闪退并报错,
omxplayer.bin: SubtitleRenderer.cpp:133: SubtitleRenderer::load_glyph(SubtitleRenderer::InternalChar)::: Assertion `!vgGetError()' failed. /usr/bin/omxplayer: 行 67: 1039 已放弃 LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"老婆大人很不满,说干嘛要用你这破玩意儿。
找到一个解决方案(未验证),先搁这
在/boot/config.txt里加一行 gpu_mem=128,加大GPU缓存
来源:https://github.com/huceke/omxplayer/issues/231