Skip to content

Instantly share code, notes, and snippets.

View pinfort's full-sized avatar
🏢
Shachiku

pinfort pinfort

🏢
Shachiku
View GitHub Profile
@pinfort
pinfort / Django_unsignedBigint.py
Last active July 4, 2019 05:39
Django database fields for using unsigned bigint column
from django.db import models
class PositiveBigIntergerRelDbTypeMixin(models.PositiveIntegerRelDbTypeMixin):
def rel_db_type(self, connection):
if connection.features.related_fields_match_type:
return self.db_type(connection)
else:
return models.BigIntegerField().db_type(connection=connection)
class PositiveBigIntegerField(PositiveBigIntegerRelDbTypeMixin, models.BigIntegerField):
We couldn’t find that file to show.
#! /bin/sh
apt-get update
apt-get upgrade -y
adduser pinfort
chmod 701 /home/pinfort
mkdir /home/pinfort/.ssh
chmod 700 /home/pinfort/.ssh
chown pinfort:pinfort /home/pinfort/.ssh
vi /home/pinfort/.ssh/authorized_keys
chmod 600 /home/pinfort/.ssh/authorized_keys