This file contains 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
try { | |
$(document).ready(function() { | |
// ... | |
}); | |
window.javascriptReady = true; | |
} catch(e) { | |
if (window.Raven) { |
This file contains 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
def translator(term): | |
return get_localizer(get_current_request()).translate(term) | |
deform_template_dir = resource_filename('deform', 'templates/') | |
deformdemo_template_dir = resource_filename('deformdemo', 'custom_widgets/') | |
zpt_renderer = deform.ZPTRendererFactory( | |
(deformdemo_template_dir, deform_template_dir,), translator=translator) |
This file contains 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
Celery task raised an exception (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely) (psycopg2.extensions.TransactionRollbackError) deadlock detected | |
DETAIL: Process 18932 waits for ShareLock on transaction 166111; blocked by process 18933. | |
Process 18933 waits for ShareLock on transaction 166110; blocked by process 18932. | |
HINT: See server log for query details. | |
CONTEXT: while updating tuple (15,4) in relation "asset_content" | |
[SQL: 'UPDATE asset_content SET updated_at=%(updated_at)s, published_at=%(published_at)s, other_data=%(other_data)s WHERE asset_content.id = %(asset_content_id)s'] [parameters: {'published_at': datetime.datetime(2017, 2, 6, 10, 35, 42, 637436, tzinfo=datetime.timezone.utc), 'updated_at': datetime.datetime(2017, 2, 6, 10, 35, 42, 637430, tzinfo=datetime.timezone.utc), 'asset_content_id': UUID('3377ace2-0010-482d-a337-1703de763760'), 'other_data': '{"tags": [{"term": "Bitcoin", "label": null, "scheme": null}, |
This file contains 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
#!/bin/sh | |
BAK_PATH="${HOME}/.config/quassel-irc.org/quassel-storage.sqlite.bak" | |
CURRENT_PATH="${HOME}/.config/quassel-irc.org/quassel-storage.sqlite" | |
# first day of data that will be maintained | |
# -15 day means that *every* chatline stored before 16 days ago and so on are going to be eliminated. | |
# only the last 15 days are keeped. | |
DATE_TO_PRUNE='-15 day' | |
die() { |
This file contains 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
# Ubuntu 14.04 repo | |
# For more repos see https://www.ubuntuupdates.org/ppa/postgresql?dist=trusty-pgdg | |
# Install key | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
# 14.04 repo | |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" >> /etc/apt/sources.list.d/postgresql.list' | |
apt update |
This file contains 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
#!/bin/bash | |
# | |
# Import old svn folders to Bitbucket | |
# Repositories can be found under https://bitbucket.org/miohtama/ | |
# Based on bitbucket-cli and http://stackoverflow.com/a/19670989/315168 | |
# | |
# 1. Add your credentials in ~/.bitbucket before running | |
# 2. Before running make sure you can SSH authenticate against bitbucket: ssh miohtama@bitbucket.org | |
# |
This file contains 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
pragma solidity ^0.4.4; | |
import "../tokenmarket/MilestonePriced.sol"; | |
import "./TestableNow.sol"; | |
contract TestableMilestonePriced is MilestonePriced { | |
bool public tested = false; |
This file contains 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
yoursite.net server has been automatically set up by websauna.ansible playbook. | |
Helpful commands | |
---------------- | |
Service statuses:: | |
sudo -i | |
supervisorctl status | |
service nginx status && service redis-server status && service postgresql status && service postfix status |
This file contains 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
""" | |
allows users to sign up and login with their phone number, if that number is assoicated with an | |
existing customer record. | |
""" | |
import logging | |
import colander | |
from cornice.service import Service | |
from pyramid.exceptions import HTTPBadRequest | |
from pyramid_sms.utils import normalize_us_phone_number |
This file contains 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
INFO: This package is registered on PyPI. | |
Upload to pypi (Y/n)? y | |
There were errors or warnings. | |
ERROR: Package upload has failed. | |
Traceback (most recent call last): | |
File "/Users/mikko/code/wattcoin/venv/lib/python3.5/site-packages/zest/releaser/utils.py", line 749, in retry_twine | |
return twine_function(*twine_args) | |
TypeError: upload() missing 3 required positional arguments: 'cert', 'client_cert', and 'repository_url' |