If you have to extend an existing object with additional property, always prefer Vue.set()
over Object.assign()
(or spread operator).
Example below explains implications for different implementations.
from django.contrib import admin | |
from .models import User | |
admin.site.register([User]) |
SELECT TOP 10 | |
CONVERT(UNIQUEIDENTIFIER, CONVERT(BINARY(16), Fld)) AS guid | |
FROM [DATABASE]..[Info] | |
ORDER BY _Period DESC; |
Story: | |
My hdd is 1tb but i bought a 256gb ssd. I partitioned it accordingly: | |
140gb windows | |
50gb ubuntu | |
50gb fedora | |
1gb linux boot | |
250mb efi system | |
I want to move operating system files to ssd to make my development env faster, and my documents to hdd. |
deploy: | |
environment: production | |
stage: deploy | |
script: | |
- which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y ) | |
- eval $(ssh-agent -s) | |
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store | |
- ssh-add <(echo -e “$SSH_PRIVATE_KEY”) | |
- gem install capistrano | |
- cap staging deploy |
# One liner | |
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
# Explained | |
wget \ | |
--recursive \ # Download the whole site. | |
--page-requisites \ # Get all assets/elements (CSS/JS/images). | |
--adjust-extension \ # Save files with .html on the end. | |
--span-hosts \ # Include necessary assets from offsite as well. | |
--convert-links \ # Update links to still work in the static version. |
// Fix for validations on simple form | |
// Need to import bootstrap functions and mixins if you want to dynamically set colors | |
// Otherwise replace theme-color... with hex color | |
@import 'bootstrap/functions'; | |
@import 'bootstrap/variables'; | |
@import 'bootstrap/mixins'; | |
.has-invalid { | |
.invalid-feedback { |
from django import forms | |
from django.core.exceptions import ValidationError | |
from django.db import transaction | |
class InvalidInputsError(Exception): | |
def __init__(self, errors, non_field_errors): | |
self.errors = errors | |
self.non_field_errors = non_field_errors |
Edit check.py and set your worker name, wallet address, email info, and google app password.
Make it executable
chmod +x check.py
Setup root's crontab (root needed to reboot)
sudo crontab -e
import asyncio | |
import functools | |
import json | |
import secrets | |
import aiohttp | |
from concurrent.futures import ALL_COMPLETED | |