Skip to content

Instantly share code, notes, and snippets.

@bpluly
bpluly / gist:e2585bac2af9c16c59b4cba8f182eeb6
Created May 19, 2022 16:27
Upgrading Couchdb when bintray.apache was the original repo for the installation
In the case where an RPM was originally installed from bintray in fixing you have to modify the baseurl to be the same release version os as the original install.
For el7, explicitly make it el7, do not change it to 8 or vice versa.
Then the update will happen without any intervention.
If you do then you will likely have to install libmozjs.rpm by hand and you will then have a revision conflict with zlib.
Additionally, for speed you can edit the bintray .repo file to have the jfrog baseurl and gpgkey (still specifying el7 or el8). But it's preferable to disable bintray and add the repo https://couchdb.apache.org/repo/couchdb.repo, then edit couchdb.rep as above.
@bpluly
bpluly / orderexample
Last active February 11, 2022 15:46
Couchdb example of using one document to index others, for alternate orders
The order document specifies different orders of the same set of documents.
{
"_id": "order",
"_rev": "11-f5ddfed421c4cfcd24ab38ae74e34723",
"zettelNoteType": "order",
"order": [
{
"orderKey": "bpluly",
"orderList": [
"00000000-150d3af6-8e17-46e5-8da5-4bf7935e52ac",
@bpluly
bpluly / tweepy_dm_example.py
Last active July 22, 2021 15:35
Tweepy Account Activity Getting DMs
# This is a part of a web app that subscribes to all Activity using the Tweepy ActivityAPI module.
# This assumes that the authentication and setup of the application connected to a user has been done.
# In this case the connection is for a single Twitter Account because it's actually a service handling
# everything the backend of zettel.io needs in the way of API and services.
# The webhook gets all of the Account Activity and sends each event onto a queue, there's a filter
# subscribed to the queue which parses the events and cherry picks the ones that are wanted.
# Things that look like dictionaries in this tend to be a database or a document, it's all config related
# in this example.
from tweepy.binder import bind_api