This file contains hidden or 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
| FROM vbatts/slackware:15.0 | |
| LABEL maintainer "Stefan Corneliu Petrea <stefan.petrea@gmail.com>" | |
| RUN slackpkg update | |
| COPY bashrc /root/.bashrc | |
| RUN source ~/.bashrc && slackpkg_unatt install ca-certificates perl rsync lz4 cyrus-sasl curl zstd xxHash nghttp2 brotli gcc make binutils patch | |
| RUN update-ca-certificates -f | |
| RUN wget -O sbopkg.tgz https://github.com/sbopkg/sbopkg/releases/download/0.38.2/sbopkg-0.38.2-noarch-1_wsr.tgz | |
| RUN upgradepkg --install-new sbopkg.tgz | |
| RUN mkdir -p /var/lib/sbopkg/queues /var/lib/sbopkg/SBo/15.0 |
This file contains hidden or 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 | |
| IFS=$'\n' | |
| export FZF_DEFAULT_COMMAND='cd ~/books ; fd . -a -i -e "pdf" -e "djvu" -e "epub" --type f' | |
| # files=($(fzf-tmux --query="$1" --multi --select-1 --exit-0)) | |
| FILE=$(fzf --print-query --bind 'tab:replace-query' | head -1) | |
| nohup okular "$FILE" & sleep 1 |
This file contains hidden or 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 | |
| # | |
| # Builds all the repos. Yes it assumes they're .NET projects. | |
| # This can be adapted to other toolchains and makefiles (automake / cmake / npm / ninja / etc) | |
| # of your choice. | |
| # | |
| for d in $(find -maxdepth 1 -mindepth 1 -type d); do | |
| cd $d | |
| echo "== $d ==" | |
| #find -name "build*cmd" | xargs -I{} powershell.exe -c './{}' ; |
This file contains hidden or 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 | |
| # | |
| # Example: ./drawio-decompress.sh https://raw.githubusercontent.com/TalalAlrawajfeh/mathematics-roadmap/master/mathematics-roadmap.drawio | |
| # | |
| # https://app.diagrams.net/ | |
| # https://drawio-app.com/extracting-the-xml-from-mxfiles/ | |
| # | |
| curl "$1" | \ | |
| perl -pne 's{.*<diagram[^<>]+">}{}g; s{<\/d.*}{}g;' | \ | |
| base64 -d | \ |
This file contains hidden or 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 | |
| # | |
| # Rasterizing a multi-page PDF | |
| # Summary: split to pages, convert each page to png, convert each png to pdf, re-assemble | |
| # Use-case: https://en.wikipedia.org/wiki/Content_Disarm_%26_Reconstruction | |
| # | |
| # Requirements: | |
| # 1. sudo apt-get install pdftk imagemagick | |
| # 2. Edit /etc/ImageMagick-6/policy.xml and make sure you have the following two lines at the end | |
| # <policy domain="coder" rights="read|write" pattern="PDF" /> |
This file contains hidden or 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
| gen_data: | |
| echo "1 2 3" > data.tsv | |
| echo "4 5 6" >> data.tsv | |
| echo "7 8 9" >> data.tsv | |
| build_db: | |
| sqlite3 data.db < schema.sql | |
| query: | |
| ./query.sh |
This file contains hidden or 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
| " general settings | |
| set nocompatible | |
| set backspace=indent,eol,start " allow backspacing over everything in insert mode | |
| set nobackup " don't keep a backup file | |
| set noswapfile " no swap file either | |
| set history=800 " keep lines of command line history | |
| set ruler " show the cursor position all the time | |
| set showcmd " display incomplete commands | |
| set incsearch " do incremental searching |