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/env python | |
# pip install google-cloud-vision | |
# Follow quick start instructions to set up access to the API and authentication | |
# https://pypi.org/project/google-cloud-vision/ | |
import glob | |
import io | |
import os |
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 | |
# usage: | |
# $ export GITHUB_TOKEN=[token] | |
# $ rename-master-to-main.sh [org] [repo] | |
# generate GITHUB_TOKEN at https://github.com/settings/tokens/new with "repo" privileges | |
ORG="$1" | |
REPO="$2" | |
rm -rf $REPO |
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 django.core.urlresolvers import reverse | |
from django.test import TestCase, Client | |
from django.contrib.admin.sites import AdminSite | |
from gloodny.models import * | |
from django.forms.models import model_to_dict | |
class ChangeHistoryTests(TestCase): | |
fixtures = ['init_gloodny.json'] |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |