python -m pip install wsgidav cheroot lxml
python -m wsgidav.server.server_cli -p60012 --root=/ --auth=anonymous -Hlocalhost
#!/bin/bash | |
SSH_DIR="${HOME}/.ssh" | |
chmod 700 "${SSH_DIR}" | |
find "${SSH_DIR}" -type f \( -name 'id_rsa' -o -name 'id_dsa' -o -name 'id_ecdsa' -o -name 'id_ed25519' \) -exec chmod 600 {} \; | |
find "${SSH_DIR}" -type f \( -name '*.pub' -o -name 'known_hosts' -o -name 'authorized_keys' \) -exec chmod 644 {} \; | |
from pathlib import Path | |
import logging | |
import sys | |
def set_logger(error_file: Path, info_file: Path): | |
error_file = Path(error_file).expanduser().resolve() | |
error_file.parent.mkdir(exist_ok=True, parents=True) | |
info_file = Path(info_file).expanduser().resolve() | |
info_file.parent.mkdir(exist_ok=True, parents=True) |
#include <iostream> | |
#include <functional> | |
#include <unordered_map> | |
#include <tuple> | |
// Define a hash function for std::tuple so that it can be used as a key in std::unordered_map | |
namespace std { | |
template <typename... T> | |
struct hash<std::tuple<T...>> { | |
size_t operator()(const std::tuple<T...>& t) const { |
# FLASK Webapp for Image Segmentation Model | |
import os, sys, io | |
sys.path.append(".") | |
import webapp | |
from flask import Flask | |
import flask | |
import numpy as np | |
import pandas as pd |
#!/usr/bin/env python3 | |
from argparse import ArgumentParser | |
from functools import partial | |
from shutil import copy | |
from subprocess import Popen, PIPE | |
from shlex import split | |
import os | |
import re | |
import atexit |
[includeIf "gitdir:~/Projects/work/"] | |
path = .gitconfig_job | |
[includeIf "gitdir:~/Projects/personal/"] | |
path = .gitconfig_personal | |
[filter "lfs"] | |
clean = git-lfs clean -- %f | |
smudge = git-lfs smudge -- %f | |
process = git-lfs filter-process |
#!/usr/bin/env python3 | |
from pathlib import Path | |
import os | |
import sys | |
from subprocess import Popen, PIPE, getoutput | |
from shlex import split | |
from contextlib import redirect_stdout | |
import argparse |
[Unit] | |
Description=Kills VLC on resume in order to fix logging spam | |
[Service] | |
Type=oneshot | |
ExecStart=-/usr/bin/killall vlc | |
TimeoutSec=0 | |
StandardOutput=syslog | |
After=suspend.target |