https://mitxela.com/projects/dotfiles_management
alias dotfiles='git --git-dir=/home/mx/.dotfiles --work-tree=/'
dotfiles config --local status.showUntrackedFiles no
import http.client | |
import socket | |
import xmlrpc.client | |
class UnixStreamHTTPConnection(http.client.HTTPConnection): | |
def connect(self): | |
self.sock = socket.socket( | |
socket.AF_UNIX, socket.SOCK_STREAM | |
) |
#!/usr/bin/env python | |
import subprocess | |
from pathlib import Path | |
output = subprocess.run(['git', 'ls-files'], stdout=subprocess.PIPE, text=True, check=True) | |
paths = [Path(path) for path in output.stdout.strip().split('\n')] | |
for path in paths: | |
print(path) |
data:text/html,<body contenteditable style=font-family:monospace;line-height:1.5;font-size:24px><script> window.onbeforeunload = function(e) { e.preventDefault();return ''; }; </script> |
$ defaults write -g InitialKeyRepeat -int 13 | |
$ defaults write -g KeyRepeat -int 1 |
$ ipython | |
Python 3.8.4 (v3.8.4:dfa645a65e, Jul 13 2020, 10:45:06) | |
Type 'copyright', 'credits' or 'license' for more information | |
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help. | |
In [1]: from langchain.agents import Tool, initialize_agent | |
...: from langchain.agents import load_tools | |
...: from langchain.llms import OpenAI | |
...: |
https://mitxela.com/projects/dotfiles_management
alias dotfiles='git --git-dir=/home/mx/.dotfiles --work-tree=/'
dotfiles config --local status.showUntrackedFiles no
from itertools import cycle, slice | |
fizz = cycle('', '', 'fizz') | |
buzz = cycle('', '', '', '', 'buzz') | |
pairs = zip(fizz, buzz) | |
for pair in slice(pairs, 30): | |
print(' '.join(pair)) |
# Convert .m4v to .mp4 | |
$ ffmpeg -i input.m4v -c:v libx264 -c:a aac output.mp4 | |
# Convert .mp4 to .webm | |
$ ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 30 -b:v 0 -b:a 128k -c:a libopus output.webm |
html { | |
max-width: 70ch; | |
padding: calc(1vmin + .5rem); | |
margin-inline: auto; | |
font-size: clamp(1em, 0.909em + 0.45vmin, 1.25em); | |
font-family: system-ui; | |
} | |
body { | |
line-height: 1.6; | |
} |
"""Server-side I/O Performance in Python | |
Based on the article and discussion at: | |
https://www.toptal.com/back-end/server-side-io-performance-node-php-java-go | |
The code was posted at: | |
https://peabody.io/post/server-env-benchmarks/ |