I hereby claim:
- I am jag3773 on github.
- I am jag3773 (https://keybase.io/jag3773) on keybase.
- I have a public key ASDCTGfmirHAZnbI0jIyBwBqtFOpB1zQCsGnUxh_ZiapYwo
To claim this, I am signing this object:
#!/usr/bin/env bash | |
# | |
# This script downloads the Berean Standard Bible and converts it | |
# to markdown files for an Obsidian vault. | |
# | |
# - Each chapter has it's own file, e.g. "Genesis 1.md" | |
# - A "Bible.md" index file is also created for navigation. | |
# | |
# This will output all files into a subdirectory called BSB. | |
# |
#!/usr/bin/env python3 | |
# | |
# First, install File Cabinet by Awesome Table plugin. Follow their [instructions](https://support.awesome-table.com/hc/en-us/articles/360004223619--Part-2-Use-Files-Cabinet-to-display-Google-Drive-contents) to list all of your Google Drive files + metadata. You should end up with a Google Sheet that has all of your files listed on one or more sheets. | |
# Second, download the sheet(s) from the above Google Sheet as CSV files (into your Downloads directory). | |
# Third, modify 'outputdir' (line 11) and the path to your CSV file at the bottom (line 38) | |
# Fourth, run this script | |
import csv | |
from datetime import datetime |
#!/usr/bin/env python3 | |
# | |
# Get CSV from https://www.goodreads.com/review/import | |
import csv | |
import os | |
# change these to match your setup | |
outputdir = 'YOUROUTPUTDIRECTORY' | |
goodreadsfile = '~/Downloads/goodreads_library_export.csv' |
#!/usr/bin/env bash | |
# This turns natural references into wiki link references like this: | |
# Genesis 12:3 -> [[Genesis 12#12:3]] | |
# Psalm 119:9-11 -> [[Psalm 119#119:9-11]] | |
# 1 John 3 -> [[1 John 3]] | |
# First John 1 -> [[1 John 1]] | |
# Put this file into .git/hooks/ and it will run every time you | |
# commit into your repository. Make sure it is executable, you can run | |
# chmod +x .git/hooks/pre-commit |
I hereby claim:
To claim this, I am signing this object:
Environment: | |
Request Method: POST | |
Request URL: https://....org/publish/request/ | |
Django Version: 1.7.5 | |
Python Version: 2.7.5 | |
Installed Applications: | |
['django.contrib.admin', |
bash-4.2$ git pull | |
U _sass/fonts.scss | |
Pull is not possible because you have unmerged files. | |
Please, fix them up in the work tree, and then use 'git add/rm <file>' | |
as appropriate to mark resolution, or use 'git commit -a'. | |
bash-4.2$ git diff | |
diff --cc _sass/fonts.scss | |
index 24efdc5,043813c..0000000 | |
--- a/_sass/fonts.scss | |
+++ b/_sass/fonts.scss |
>>> data | |
{'content': u'https://api.unfoldingword.org/obs/txt/1/es/obs-es.json?date_modified=20141208', 'sig': u'MGUCMQDnCIED/Rzt09WRBvC8ngxLNGOYaWC4dWJkGnuYwkiLYR+hvyogDlx+v+YVaFiRUvcCMGKQD3FjJpspjVJQsbfEW7z2OIOmrGRyDIWzb6TbAnCCj1Gn00JRidI3SgUomSd8eQ==', 'slug': u'uW'} | |
>>> payload = json.dumps(data) | |
>>> payload | |
'{"content": "https://api.unfoldingword.org/obs/txt/1/es/obs-es.json?date_modified=20141208", "sig": "MGUCMQDnCIED/Rzt09WRBvC8ngxLNGOYaWC4dWJkGnuYwkiLYR+hvyogDlx+v+YVaFiRUvcCMGKQD3FjJpspjVJQsbfEW7z2OIOmrGRyDIWzb6TbAnCCj1Gn00JRidI3SgUomSd8eQ==", "slug": "uW"}' | |
>>> req = urllib2.Request(api, payload, {'Content-Type': 'application/json'}) | |
>>> f = urllib2.urlopen(req) | |
>>> response = f.read() | |
>>> f.close() | |
>>> response |
import ecdsa | |
from ecdsa import SigningKey, VerifyingKey | |
sk = SigningKey.from_pem(open('uW-test-sk.pem', 'r').read()) | |
payload = open('/var/www/vhosts/api.unfoldingword.org/httpdocs/obs/txt/1/en/obs-en.json', 'r').read() | |
sig_der = sk.sign_deterministic(payload, sigencode=ecdsa.util.sigencode_der) | |
f = open('/var/www/vhosts/api.unfoldingword.org/httpdocs/obs/txt/1/en/obs-en.der.sig', 'w') | |
f.write(sig_der) | |
f.close() |
[jesse@jesse crypt]$ wget https://api.unfoldingword.org/obs/txt/1/en/obs-en.json | |
[jesse@jesse crypt]$ wget https://api.unfoldingword.org/obs/txt/1/uW-test-vk.der | |
[jesse@jesse crypt]$ wget https://api.unfoldingword.org/obs/txt/1/en/obs-en.der.sig | |
[jesse@jesse crypt]$ ls | |
obs-en.der.sig obs-en.json uW-test-vk.der | |
[jesse@jesse crypt]$ openssl dgst -keyform DER -verify uW-test-vk.der -signature obs-en.der.sig obs-en.json | |
Verified OK |