$ sudo npm install -g hexo-cli
$ hexo -v
hexo-cli: 0.1.9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- based on http://stackoverflow.com/questions/21767780/how-to-find-size-of-database-schema-table-in-redshift | |
SELECT name AS table_name, ROUND((COUNT(*) / 1024.0),2) as "Size in Gigabytes" | |
FROM stv_blocklist | |
INNER JOIN | |
(SELECT DISTINCT id, name FROM stv_tbl_perm) names | |
ON names.id = stv_blocklist.tbl | |
GROUP BY name | |
ORDER BY "Size in Gigabytes" DESC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Please bear in mind this is for a Debian environment - specifically Jessie so directive in apache | |
vhost will differ if you're not using apache-2.4. | |
I followed the instructions for the development environment (N.B. DO NOT use `test` as the account | |
for `createsuperuser` as this will break `loaddate test_data`): | |
sudo mkdir /usr/share/readthedocs | |
sudo chown your_username readthedocs | |
sudo apt-get install build-essential python-dev libxml2-dev libxslt1-dev zlib1g-dev virtualenv git | |
cd /usr/share/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import random | |
q = asyncio.Queue() | |
async def producer(num): | |
while True: | |
await q.put(num + random.random()) | |
await asyncio.sleep(random.random()) |