Please note - you may want to validate whether the options used affect your setup.
Create a new service file.
nano /etc/systemd/system/disable-offloading.service
| FROM python:3.10-slim-buster | |
| WORKDIR /app | |
| COPY reiquirements.txt main.py | |
| RUN pip install -r requirements.txt | |
| CMD [ "python", "waitress_server" ] |
Taken from a DigitalOcean tutorial.
Create and enable swapfile:
# create a 2GB file only accessible by root
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
# mark the file as a swap space| SELECT table, | |
| formatReadableSize(sum(bytes)) as size, | |
| min(min_date) as min_date, | |
| max(max_date) as max_date | |
| FROM system.parts | |
| WHERE active | |
| GROUP BY table |
| char *user_country_name = ""; // [MOD] | |
| module_param_named(cn, user_country_name, charp, S_IRUGO); // [MOD] | |
| MODULE_PARM_DESC(cn, "Country Name"); // [MOD] | |
| static int __ath_regd_init(struct ath_regulatory *reg) | |
| { | |
| struct country_code_to_enum_rd *country = NULL; | |
| u16 regdmn; | |
| if (!reg) |
| deploy:live: | |
| image: 1drop/docker:git | |
| stage: deploy | |
| when: manual | |
| environment: | |
| name: production | |
| url: https://www.somecustomer.de | |
| before_script: | |
| - eval $(ssh-agent -s) | |
| - ssh-add <(echo "$SSH_PRIVATE_KEY") |
| #http://www.oidview.com/mibs/0/IF-MIB.html | |
| #http://www.net-snmp.org/docs/mibs/interfaces.html | |
| cisco_custom: | |
| version: 2 | |
| auth: | |
| community: public | |
| walk: | |
| - 1.3.6.1.2.1.2.2.1 | |
| - 1.3.6.1.2.1.31.1.1.1 | |
| metrics: |
Create file /etc/systemd/system/[email protected]. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.
[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service| class MyModel(models.Model): | |
| onefield = models.CharField('The field', max_length=100) | |
| class MyModelAdmin(admin.ModelAdmin): | |
| def has_add_permission(self, request): | |
| # if there's already an entry, do not allow adding | |
| count = MyModel.objects.all().count() | |
| if count == 0: | |
| return True | |
| return False |