This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://docs.oracle.com/en/virtualization/virtualbox/6.0/admin/changenat.html#nat-adv-dns | |
$env:PATH = $env:PATH + ";C:\Program Files\Oracle\VirtualBox" | |
VBoxManage list runningvms | |
VBoxManage startvm <VM-NAME> | |
# DNS resolver options | |
VBoxManage modifyvm <VM-NAME> --natdnshostresolver1 on | |
# or | |
VBoxManage modifyvm <VM-NAME> --natdnsproxy1 on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/a/19358402/117220 | |
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH \ | |
-dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile=output.pdf input.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
DIGITS = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'] | |
TEENS = ['ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'] | |
TENS = ['ten', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'] | |
def speek_0(n: int) -> [str]: | |
"""Auxiliary function.""" | |
words = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo "ertyoiu" | podman secret create asdf - | |
c680db24d26dc024f36f90e90 | |
$ podman secret ls | |
ID NAME DRIVER CREATED UPDATED | |
c680db24d26dc024f36f90e90 asdf file 5 seconds ago 5 seconds ago | |
$ podman run --rm -ti --secret asdf alpine | |
/ # ls /var/run/secrets/ | |
asdf | |
/ # ls /var/run/secrets/asdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import jinja2 | |
import pygments | |
import pygments.lexers as lexers | |
from pygments.formatters import HtmlFormatter | |
CSS_CLASS = ".code" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import statistics | |
import ast | |
import math | |
import json | |
from typing import Callable | |
class ParseError(Exception): | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
diff --color <(yq -P 'sort_keys(..)' $1) <(yq -P 'sort_keys(..)' $2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shoulid be in ~/.local/share/applications/idea-ultimate.desktop | |
[Desktop Entry] | |
Version=1.0 | |
Name=Idea Ultimate | |
GenericName=IDE | |
Terminal=false | |
Exec=/opt/idea-IU-212.5457.46/bin/idea.sh | |
Terminal=false | |
Type=Application | |
Icon=/opt/idea-IU-212.5457.46/bin/idea.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Fix for working in IntelliJ behind corporate firewall in Linux. | |
# Note that this makes your Idea's TLS communications monitored. | |
# Note that if you have a JetBrains license owned by your company, | |
# then better ask your IT support to fix cert problems instead. | |
# Howto: | |
# 0. Your company cert is expected to be in /usr/local/share/ca-certificates/extra/MyCompanyCA.crt | |
# 1. Launch Intellij. | |
# 2. Copy CA storage path from the "certificate problem" pop up dialog. Close IntelliJ. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while inotifywait -e modify -r . ; | |
do | |
lein test; | |
echo; | |
done |
NewerOlder