This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.
⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
""" | |
Django ORM Optimization Tips | |
Caveats: | |
* Only use optimizations that obfuscate the code if you need to. | |
* Not all of these tips are hard and fast rules. | |
* Use your judgement to determine what improvements are appropriate for your code. | |
""" | |
# --------------------------------------------------------------------------- |
:local queueName "Client-$leaseActMAC"; | |
:local ipAdd "$leaseActIP/32"; | |
:if ([:len [/queue simple find name=$queueName]] = 0) do={ | |
:log info "No Queue"; | |
/queue simple add name=$queueName target=($ipAdd) limit-at=10M/4M max-limit=10M/4M comment=[/ip dhcp-server lease get [find where active-mac-address=$leaseActMAC && active-address=$leaseActIP] host-name]; | |
} else={ | |
:log info "exists"; | |
:local ada [/queue simple get [find name=$queueName] target]; |
from django.apps import AppConfig | |
class ForumConfig(AppConfig): | |
name = 'forum' | |
# This function is the only new thing in this file | |
# it just imports the signal file when the app is ready | |
def ready(self): | |
import your_app_name.signals |
See this issue.
Docker best practise to Control and configure Docker with systemd.
Create daemon.json
file in /etc/docker
:
{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
Follow [steps][1]:
Import-Module 'C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1'
ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath d:\scratch\vmx\VM-disk1.vmdk -VhdType DynamicHardDisk -VhdFormat vhdx -destination c:\vm-disk1
model_name = 'Invoice'
app_name = 'invoice'
from django.apps import apps
Invoice = apps.get_model(app_label=app_name, model_name=model_name)
i = Invoice.objects.filter(id=1234).first()
# Inspired from https://pythonprogramming.net/encryption-and-decryption-in-python-code-example-with-explanation/ | |
# PyCrypto docs available at https://www.dlitz.net/software/pycrypto/api/2.6/ | |
from Crypto.Cipher import AES | |
import base64, os | |
def generate_secret_key_for_AES_cipher(): | |
# AES key length must be either 16, 24, or 32 bytes long | |
AES_key_length = 16 # use larger value in production | |
# generate a random secret key with the decided key length |