Skip to content

Instantly share code, notes, and snippets.

location /robots.txt {
sub_filter 'webflow.mysite.com.au' $host;
sub_filter_once off;
sub_filter_types *;
proxy_pass https://webflow.mysite.com.au/robots.txt;
proxy_set_header Host webflow.mysite.com.au;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
type E<T> = Exclude<T, undefined | null>
export function pathOr<
D extends any,
O extends object,
P0 extends keyof E<O>,
V0 extends E<O>[P0],
>(def: D, path: [P0], obj: O): D | V0;
export function pathOr<
# 360p
ffmpeg -hide_banner -y -i ./original.vid \
-vf scale=w=640:h=360:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 800k -maxrate 856k -bufsize 1200k -b:a 96k -pix_fmt yuv420p -hls_segment_filename build/360p_%04d.ts build/360p.m3u8
if [[ $width -ge 842 && $height -ge 480 ]]; then
# 480p
ffmpeg -hide_banner -y -i ./original.vid \
-vf scale=w=842:h=480:force_original_aspect_ratio=decrease -c:a aac -ar 48000 -c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 1400k -maxrate 1498k -bufsize 2100k -b:a 128k -pix_fmt yuv420p -hls_segment_filename build/480p_%04d.ts build/480p.m3u8
fi
if suppliers.present?
all_active_plants.where(supplier: suppliers)
else
all_active_plants
end
import React, {
useEffect,
useState,
useContext,
useReducer,
createContext,
PropsWithChildren,
Context,
} from "react";
(lsp--client-new-connection client) (lsp-stdio-connection
(lambda ()
(lsp-docker--set-up-dir-locals-class base-server-id base-server-folders)
(lsp-docker--get-command-string base-server-id))
(lambda () t)))
;; BEFORE
(defun lsp-docker--with-plist-keys (plist &rest required-keys happy-fn)
"apply required-keys' values to happy-fn, or make an error "
(let* ((existing-keys (loop for (key value . rest) on plist by 'cddr collect key))
(difference (seq-difference required-keys existing-keys)))
(if (> 0 (length difference))
(funcall happy-fn (--map (plist-get plist it) required-keys))
(error "list is missing %s" difference))))
(defun lsp-docker--docker-command (config)
(defun lsp-docker--with-plist-keys (list &rest required-keys happy-fn sad-fn)
"handle when keys exist & don't exist"
(let* ((existing-keys (mapcar 'car list))
(difference (-difference required-keys existing-keys)))
(if (> 0 (length difference))
(funcall happy-fn (--map (plist-get list it) required-keys))
(error "list is missing %s" difference))))
((nil . ((enable-remote-dir-locals . t)
(lsp-enabled-clients . (pyls-docker-compose))
(lsp-docker-compose-client-customizations . ((:base-server-id pyls
:compose-file-path "/home/sia/Filing/Uppley-Backend--Fusionlabs--Airteam--Radiant/docker-compose.yml"
:docker-image-name "uppley-backend"
:service-name "app"
:container-name "flibbit"
:container-command "pyls"
:host-work-dir "/home/sia/Filing/Uppley-Backend--Fusionlabs--Airteam--Radiant"
:container-work-dir "/app"))))))
server {
listen 80;
auth_basic "Log in";
auth_basic_user_file .htpasswd;
location /healthcheck {
add_header Content-Type text/plain;
return 200 'healthy';
}