Mit dieser Anleitung wird erklärt, wie Passwörter an vertrauensvolle Personen verteilt werden können.
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
import os | |
import sys | |
from time import sleep | |
from usb.core import find as usb_find, USBError | |
def call_usb(func): | |
def wrapper(self, *args, **kwargs): | |
try: | |
func(self, *args, **kwargs) |
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
import re | |
from django.db import models | |
from django import forms | |
class HexFormField(forms.CharField): | |
default_error_messages = { | |
'invalid': 'Enter a valid hexfigure: e.g. "ff0022"', | |
} |
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
class IdManyRelatedField(ManyRelatedField): | |
field_name_suffix = '_ids' | |
def bind(self, field_name, parent): | |
self.source = field_name[:-len(self.field_name_suffix)] | |
super().bind(field_name, parent) | |
class IdPrimaryKeyRelatedField(PrimaryKeyRelatedField): | |
""" |
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
class RedisCache(_RedisCache): | |
""" | |
Wrapper to redis cache that creates status keys for the time a value is | |
created. | |
Idea from https://github.com/funkybob/puppy | |
""" | |
def get_or_set(self, key, callback, timeout=None, update_time=6): | |
""" | |
Get a key if it exists. Creates it if other case. |
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
--- | |
- hosts: inyoka_dev | |
tasks: | |
- name: enable network | |
service: | |
name: "{{ item }}" | |
state: started | |
enabled: yes | |
with_items: |
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
--- | |
# This script excepts an up to date archlinux system with installed python2, | |
# openssh and sudo and a user account with sudo permissions you can connect | |
# to. | |
- hosts: openslides | |
tasks: | |
- name: Install required packages and update package cache | |
pacman: | |
name: "{{ item }}" |
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
--- | |
- hosts: openslides | |
become: yes | |
vars: | |
settings_path: /etc/openslides | |
user_data_path: /usr/local/lib/openslides | |
secure_key: 'MakeMeRANDOM' | |
domain: openslides.oshahn.de |
I hereby claim:
- I am ostcar on github.
- I am ostcar (https://keybase.io/ostcar) on keybase.
- I have a public key ASCTQlqdzbn1FxrCM8hmPe1KsjR1IcTcj0V0y3Cofv9qogo
To claim this, I am signing this object:
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 | |
import asyncio | |
import functools | |
from datetime import datetime, timedelta | |
import websockets | |
WEBSOCKET_URI = 'ws://localhost:8000/ws/projector/1/' | |
CONNECTION_COUNT = 500 |
OlderNewer