This is an unofficial manual for the couchdb Python module I wish I had had.
pip install couchdb
| from pydrive.auth import GoogleAuth | |
| from pydrive.drive import GoogleDrive | |
| import time | |
| gauth = GoogleAuth() | |
| gauth.LoadCredentialsFile("mycreds.txt") | |
| if gauth.credentials is None: | |
| # Authenticate if they're not there | |
| gauth.LocalWebserverAuth() | |
| elif gauth.access_token_expired: |
This is an unofficial manual for the couchdb Python module I wish I had had.
pip install couchdb
| #!/bin/bash | |
| # CONST 1GB | |
| CONST_1GB="1024*1024*1024" | |
| # VARIABLE WORKERS | |
| CMD_W=0 |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| # * Defaults | |
| compression=xz | |
| subdir="web" | |
| # * Functions | |
| function debug { |
| server { | |
| listen 80; | |
| server_name example.com; | |
| root /www/example; | |
| access_by_lua 'denyip()'; #check error counter | |
| error_page 400 404 405 406 = /404.html; | |
| location = /404.html { | |
| set $inc 1; #this is useful for blocking website scanners | |
| set_by_lua $err 'incerror()' $inc; |
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
querymutationReference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
| WITH recursive dep_tree AS ( | |
| SELECT mdl0.id, mdl0.name, NULL::integer, 1 AS level, array[mdl0.id] AS path_info | |
| FROM ir_module_module mdl0 | |
| WHERE name = 'sale' -- state here the child module | |
| UNION ALL | |
| SELECT (SELECT mdl1.id FROM ir_module_module mdl1 WHERE mdl1.name = c.name), rpad('', p.level * 1, '_') || c.name, c.module_id, p.level + 1, p.path_info||c.id | |
| FROM ir_module_module_dependency c | |
| JOIN dep_tree p ON c.module_id = p.id | |
| ) | |
| SELECT level, name |