Skip to content

Instantly share code, notes, and snippets.

View l1x's full-sized avatar
🏠
Working from home

Istvan l1x

🏠
Working from home
View GitHub Profile
doas apt install npm
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
binutils binutils-aarch64-linux-gnu binutils-common build-essential dpkg-dev fakeroot g++ g++-10 gcc gcc-10 gyp libalgorithm-diff-perl
libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan6 libatomic1 libbinutils libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0
libctf0 libfakeroot libgcc-10-dev libitm1 libjs-inherits libjs-is-typedarray libjs-psl libjs-typedarray-to-buffer liblsan0 libnode-dev libnsl-dev libssl-dev
libstdc++-10-dev libtirpc-dev libtsan0 libubsan1 libuv1-dev linux-libc-dev make manpages-dev node-abbrev node-agent-base node-ajv node-ansi node-ansi-regex
node-ansi-styles node-ansistyles node-aproba node-archy node-are-we-there-yet node-asap node-asn1 node-assert-plus node-asynckit node-aws-sign2 node-aws4
aws:s3:Bucket (l1x.tld):
    error: aws:s3/bucket:Bucket resource 'l1x.tld' has a problem: 
    Conflicting configuration arguments: "acl": conflicts with grant. Examine values at 'Bucket.Acl'.
    error: aws:s3/bucket:Bucket resource 'l1x.tld' has a problem: 
    Conflicting configuration arguments: "grant": conflicts with acl. Examine values at 'Bucket.Grants'.
(venv) ➜  mano.local bi-data git:(main)
> pip install polars
Collecting polars
  Downloading polars-0.10.10.tar.gz (543 kB)
     |████████████████████████████████| 543 kB 2.0 MB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing wheel metadata (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
@l1x
l1x / install_postgres_13.sh
Created September 28, 2021 11:08
Installing PostgreSQL 13 on Amazon Linux 2
sudo amazon-linux-extras enable postgresql13
sudo yum -y clean metadata
sudo yum -y install postgresql

➜ rpi4-3.lan ui git:(main) ✗ cat docker/base/Dockerfile

FROM debian:bullseye-slim
RUN DEBIAN_FRONTEND=noninteractive apt-get clean && apt-get update \
&& apt install apt-utils && apt-get install doas -y

RUN useradd -m -u 5000 -s /sbin/nologin app || :
RUN useradd -m -u 5001 -s /bin/bash admin || :
RUN echo 'permit nopass admin as root' > /etc/doas.conf
@l1x
l1x / motd.sh
Created April 5, 2021 12:59
Creating MOTD for unix / linux hosts
cfonts "rpi4-3" -f huge --gradient blue,cyan,"#FFA500" --transition-gradient > motd
@l1x
l1x / flush_dns.sh
Created April 5, 2021 12:37
Flushing DNS cache on MacOS
sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache
#!/usr/bin/env python
import os
import hashlib
import sys
def get_folders(folder):
ret = []
for root, subdirs, _files in os.walk(folder):
for subdir in subdirs:
git config --global alias.sweep
git config --global --replace-all alias.sweep '!git branch --merged $([[ $1 != "-f" ]] \
&& git rev-parse master) | egrep -v "(^\*|^\s*(main|master|develop)$)" \
| xargs git branch -d'
➜  frontend git:(master) git stash
No local changes to save
➜  frontend git:(master) git checkout feature/user-menu-and-logout
error: Your local changes to the following files would be overwritten by checkout:
        backend/warm-up/VERSION
Please commit your changes or stash them before you switch branches.
Aborting