(living document)nLinks to various sqlite resources:nnsqlite vs postgreqsl: complicatednsqlite web rennaisancenAsk HN: Have you used SQLite as a primary database?nConsider sqlitensqlite topic on changelognlitestream Replicate your sqlite to s3 and more.nmozilla bedrocknBaked Data Pattern: Shipping the database along with the application bundle.
Category: programming
Show Databases in PostgreSQL
Two ways:npostgres=# \lnnpostgres=# select * from pg_database;
Vim power: transforming yaml to m4
The more I learn vim, the more I am impressed with the efficient ways it handles complex nrepetitive editing tasks:nMy task is to transform a yaml file to a bunch of m4 definitionsn# Welcome to Jekyll!n#n# This config file is meant for settings that affect your whole blog, valuesn# which you are expected to set up once and rarely edit after that. If you findn# yourself editing this file very often, consider using Jekyll’s data filesn# feature for the data you need to update frequently.n#n# For technical reasons, this file is *NOT* reloaded automatically when you usen# ‘bundle exec jekyll serve’. If you change this file, please restart the server process.nn# Site settingsn# These are used to personalize your new site. If you look in the HTML files,n# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.n# You can create any custom variable you would like, and they will be accessiblen# in the templates via {{ site.myvariable }}.ntitle: Sitenemail: site@example.comndescription: “some example site”nlogo: falsennbaseurl: “”nurl: “https://example.com”npermalink: “:year/:month/:day/:title/”ndomain_name: “https://example.com”nn# Details for the RSS feed generatornauthor: “anon”nn# cache buster, increment when we have changesncache_version: 2nnexcerpt_separator: “
WordPress.com API from Python: Private blog posts.
kountanis.com is a static site, generated by a Python script.nI like it that way. It’s flexibile, ages well, and experimentation is easy.nBut I want to add my instagram pics, tweets, and wordpress posts into it.
Thanks Ansible, I just saved some money on infrastucture
Just reran my ansible notebooks to provision a smaller digitalocean droplet,nand recreate this site on it. For about 45 minutes of work, I saved more than 200$/year.
How to add a “Read more” link to a Jekyll blog
We want to add a “read more” link, when the post excerptndiffers from the content. Then we link to the post using the handy post.url.nEasily done by adding this within your post loop (mine was part of home.html):n{% raw %}n{% if post.excerpt != post.content %}nRead more…n{% endif %}nn{% endraw %}
Simple CircuitBreaker in Python
If an app is communicating with remote/networked softwaren(think databases, key-value stores,nwebservices and queues to name a few)nit can and will fail.