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
sudo -u postgres psql | |
create database gits_restore; | |
sudo -u postgres psql gits_restore; | |
create extension postgis; | |
cd /backup | |
sudo -u postgres pg_restore -Fd -d gits_restore --table=route_path ./main-av_gits |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from sqlalchemy.orm import sessionmaker, relationship, aliased | |
from sqlalchemy import cast, Integer, Text, Column, ForeignKey, literal, null | |
from sqlalchemy.sql import column, label | |
class Catalog(Base): | |
__tablename__ = 'catalog' | |
id = Column(String, primary_key=True) | |
parentid = Column(String, ForeignKey('catalog.id')) | |
name = Column(String) | |
parent = relationship("Catalog", remote_side=[id]) |
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
#!/usr/bin/python3 | |
import sys | |
import asyncio | |
import greenlet | |
class AsyncIoGreenlet(greenlet.greenlet): | |
def __init__(self, driver, fn): | |
greenlet.greenlet.__init__(self, fn, driver) | |
self.driver = driver |
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
# Replace <sentry_key>, <sentry-url> and <project-id> to formulate your CURL request. Don't forget to add a trailing slash to URL otherwise you'll get wierd CSRF errors! | |
curl -X POST --data '{ "exception": [{ "type": "$ErrorMessage"}] }' -H 'Content-Type: application/json' -H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=<sentry_key>, sentry_client=raven-bash/0.1" https://<sentry-url>/api/<project-id>/store/ |