Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>XHR upload large file with slice</title> | |
<style> | |
#debug { | |
border: 3px dashed #ccc; | |
margin: 10px 0; | |
padding: 10px; |
# Terminal Tab #1 (with privileges inside container) | |
# ============= | |
cd "/the/dir/you/want/to/work/with/php8" | |
docker run --name php8 \ | |
-it \ | |
-v $PWD:/var/php:rw \ | |
php:8.0-cli-alpine3.12 \ | |
ash | |
cd /tmp |
Arch Linux Encrypted LVM Luks Btrfs Guide (EFI) | |
# Wipe disk with random data (optional) | |
badblocks -c 10240 -s -w -t random -v /dev/sda | |
# Partition | |
parted -a minimal /dev/sda | |
- mklabel gpt | |
- unit Mib | |
- mkpart ESP fat32 0% 512 | |
- set 1 boot on | |
- mkpart primary ext4 512 100% |
In this task, you're going to implement a REST API for a interacting with a menu of a restaurant. The menu is given to you as a JSON file which you will parse and perform operations on. The required features will be listed below.
In this restaurant, honesty is extremely promoted. So extreme, that the restaurant declares that differing quality of ingredients are used in their meals. Like that's not enough, it also allows the customers to choose the ingredients of each meal in different qualities. Each ingredient has the following quality levels:
low
: the cheapestmedium
: moderateimport { createContext, useContext } from 'react' | |
import { createStore, StoreApi } from 'zustand' | |
import { immer } from 'zustand/middleware/immer' | |
import { useStoreWithEqualityFn } from 'zustand/traditional' | |
type State = { | |
total: number | |
increase: () => void | |
decrease: () => void |
# study stream aliases | |
# Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro | |
declare -A pomo_options | |
pomo_options["work"]="45" | |
pomo_options["break"]="10" | |
pomodoro () { | |
if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then | |
val=$1 |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
# This supports merging as many adapters as you want. | |
# python merge_adapters.py --base_model_name_or_path <base_model> --peft_model_paths <adapter1> <adapter2> <adapter3> --output_dir <merged_model> | |
from transformers import AutoModelForCausalLM, AutoTokenizer | |
from peft import PeftModel | |
import torch | |
import os | |
import argparse |