Skip to content

Instantly share code, notes, and snippets.

View tristan-k's full-sized avatar

ʞ-uɐʇsıɹʇ tristan-k

View GitHub Profile
```
$ cat /root/autoshutdown.sh
#!/bin/bash
qm list | grep running
if [ $? -eq 1 ]
then
shutdown -h now
fi
```
@tristan-k
tristan-k / EncryptedHomeFolder.md
Created August 13, 2019 12:26 — forked from chetstone/EncryptedHomeFolder.md
Encrypted APFS Home Folder on Mac OSX

Encrypted APFS Home Folder on Mac OSX

Note: This is an update of Will Haley's excellent post to use APFS instead of CoreStorage.

I'll add to Will's warning below that this is a complex process on MacOS because the OS has a lot of assumptions on where things are. I

@tristan-k
tristan-k / gerbera.io.plist
Created May 29, 2017 07:21 — forked from elmodaddyb/gerbera.io.plist
Gerbera OSX Launchd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>gerbera.io</string>
<key>ProgramArguments</key>
<array>
@tristan-k
tristan-k / dev.py
Created January 24, 2017 16:41
cat dev.py
from .base import *
# WEB SITE URL
THIS_BOOKTYPE_SERVER = '85.214.38.3'
BOOKTYPE_URL = 'http://85.214.38.3'
# BOOKTYPE_URL = 'http://{}'.format(THIS_BOOKTYPE_SERVER)
STATIC_URL = '{}/static/'.format(BOOKTYPE_URL)
DATA_URL = '{}/data/'.format(BOOKTYPE_URL)
@tristan-k
tristan-k / base.py
Last active January 24, 2017 16:39
cat base.py
# -*- coding: utf-8 -*-
import os
from unipath import Path
import djcelery
djcelery.setup_loader()
# DJANGO ADMIN
ADMINS = (
# ('censored', '[email protected]'),
@tristan-k
tristan-k / error.log
Created January 24, 2017 16:16
cat /var/log/apache2/error.log
$ cat /var/log/apache2/error.log
[Tue Jan 24 12:03:28.565032 2017] [mpm_event:notice] [pid 16834:tid 139748292564864] AH00489: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Tue Jan 24 12:03:28.565138 2017] [core:notice] [pid 16834:tid 139748292564864] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jan 24 12:03:30.824836 2017] [mpm_event:notice] [pid 16834:tid 139748292564864] AH00491: caught SIGTERM, shutting down
[Tue Jan 24 12:03:32.156095 2017] [wsgi:warn] [pid 17024:tid 140183461709696] mod_wsgi: Compiled for Python/2.7.8.
[Tue Jan 24 12:03:32.156171 2017] [wsgi:warn] [pid 17024:tid 140183461709696] mod_wsgi: Runtime using Python/2.7.9.
[Tue Jan 24 12:03:32.157446 2017] [mpm_event:notice] [pid 17024:tid 140183461709696] AH00489: Apache/2.4.10 (Debian) mod_wsgi/4.3.0 Python/2.7.9 configured -- resuming normal operations
[Tue Jan 24 12:03:32.157469 2017] [core:notice] [pid 17024:tid 140183461709696] AH00094: Command line: '/usr/sbin/apache2'
@tristan-k
tristan-k / update_permissions.log
Created January 24, 2017 16:14
./manage.py update_permissions
$ ./manage.py update_permissions
/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py:345: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead
self.fetch_command(subcommand).run_from_argv(self.argv)
System check identified some issues:
WARNINGS:
?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS, TEMPLATE_DEBUG.
core.BookRole.members: (fields.W340) null has no effect on ManyToManyField.
core.Role.permissions: (fields.W340) null has no effect on ManyToManyField.
@tristan-k
tristan-k / update_default_roles.log
Created January 24, 2017 16:13
./manage.py update_default_roles
$ ./manage.py update_default_roles
System check identified some issues:
WARNINGS:
?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS, TEMPLATE_DEBUG.
core.BookRole.members: (fields.W340) null has no effect on ManyToManyField.
core.Role.permissions: (fields.W340) null has no effect on ManyToManyField.
messaging.Endpoint.config: (fields.W342) Setting unique=True on a ForeignKey has the same effect as using a OneToOneField.
HINT: ForeignKey(unique=True) is usually better served by a OneToOneField.
Role registered_users has been created.
@tristan-k
tristan-k / runserver.log
Created January 24, 2017 16:12
./manage.py runserver 0.0.0.0:8005
$ ./manage.py runserver 0.0.0.0:8005
Performing system checks...
System check identified some issues:
WARNINGS:
?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS, TEMPLATE_DEBUG.
core.BookRole.members: (fields.W340) null has no effect on ManyToManyField.
core.Role.permissions: (fields.W340) null has no effect on ManyToManyField.
messaging.Endpoint.config: (fields.W342) Setting unique=True on a ForeignKey has the same effect as using a OneToOneField.
@tristan-k
tristan-k / migrate.log
Created January 24, 2017 16:11
./manage.py migrate
$ ./manage.py migrate
System check identified some issues:
WARNINGS:
?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS, TEMPLATE_DEBUG.
core.BookRole.members: (fields.W340) null has no effect on ManyToManyField.
core.Role.permissions: (fields.W340) null has no effect on ManyToManyField.
messaging.Endpoint.config: (fields.W342) Setting unique=True on a ForeignKey has the same effect as using a OneToOneField.
HINT: ForeignKey(unique=True) is usually better served by a OneToOneField.
Operations to perform: