Skip to content

Instantly share code, notes, and snippets.

View rwcitek's full-sized avatar

Robert Citek rwcitek

View GitHub Profile
@rwcitek
rwcitek / foobar.py
Last active February 27, 2025 05:02
python module
def foo():
return("hello, world")
@rwcitek
rwcitek / searching.gists.md
Created October 25, 2024 19:08
Searching Gists

Searching gists with qualifiers

When searching for gists on GitHub, you can use various qualifiers to refine your search. Here are some useful keys you can utilize:

  • user: - Search gists created by a specific user (e.g., user:foobar).

  • public: - Find public gists (e.g., public:true).

  • private: - Find private gists (e.g., private:true).

@rwcitek
rwcitek / ocr.pdf.scanned.text.md
Last active November 17, 2024 22:33
OCR of a PDF with scanned text

Using Docker to OCR text from a scanned PDF

docker container run --rm -d -v "${PWD}":/tmp/zfoo --name ocr ubuntu sleep inf

docker container exec -i ocr /bin/bash << 'eof'
  export DEBIAN_FRONTEND=noninteractive
  apt-get update
  apt-get install -y python3-pip vim less tree tesseract-ocr ghostscript
 pip3 install --break-system-packages ocrmypdf
@rwcitek
rwcitek / Docker.Linux.LIL.md
Last active August 25, 2024 20:55
Learning Linux via LinkedIn Learning and Docker
@rwcitek
rwcitek / data.docker.md
Last active October 31, 2024 22:24
Data only in Docker image

Creating a data-only Docker image

# Creating the data
echo "Hello, world" > data.txt

# Creating an image with the data
{ cat <<'eof'
from scratch
workdir /data
@rwcitek
rwcitek / utf-8-scraper.ipynb
Created January 21, 2024 15:37
Create UTF-8 Dictionary
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rwcitek
rwcitek / sigkills.md
Last active January 18, 2024 00:51
process kill signals in Docker

Proccess and kill signals

These are best practiced in a virtual environment. Docker will do.

$ docker run --rm -it ubuntu /bin/bash

Here we create a background process, capture its process id ( PID ), and then kill it.

@rwcitek
rwcitek / ctes.ipynb
Last active January 15, 2024 00:16
ctes.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rwcitek
rwcitek / angular.docker.md
Created December 27, 2023 15:07
Angular in Docker

Angular in Docker

cut -c3- <<'eof' > Dockerfile
  FROM node
  
  WORKDIR /app
  SHELL ["/bin/bash","-c"]
  
 RUN apt-get update &amp;&amp; apt-get dist-upgrade -y
@rwcitek
rwcitek / gql.md
Last active December 24, 2023 14:08
GraphQL, FastAPI, Areadne in Docker

Create background container

docker container run --rm -d --name gql -p 8000:80 ubuntu sleep inf
sleep 2

Configure container

{ cat <<'eof2'