Skip to content

Instantly share code, notes, and snippets.

View iagooar's full-sized avatar

Mateusz Sójka iagooar

  • Cogito AI Labs
  • Poland
View GitHub Profile
@iagooar
iagooar / omarchy_cheat_sheet.md
Last active November 11, 2025 11:45
Omarchy 3.x Cheat Sheet for Devs

Omarchy Cheat Sheet for Devs

A comprehensive reference for Omarchy - an opinionated Arch Linux + Hyprland setup by DHH.

Essential Keyboard Shortcuts

System & Window Management

Shortcut Function
@iagooar
iagooar / matis_prd_template.md
Created September 23, 2025 20:51
Mati's PRD Template

#[ID]: [Feature Name] – Product Requirements Document (PRD)

Version

  • Project: edenlm.com
  • Date: [YYYY-MM-DD]
  • Author: [Name] (Mati, unless stated otherwise)
  • Status: [Draft/Accepted/Implemented/Archived]

@iagooar
iagooar / docker-cleanup-resources-centos.md
Last active June 1, 2018 19:32 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks (CentOS version)

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ sudo docker volume rm $(sudo docker volume ls -qf dangling=true)

$ sudo docker volume ls -qf dangling=true | xargs -r sudo docker volume rm

@iagooar
iagooar / enteprisifier.rb
Created September 30, 2016 13:38
Tiny helper to make your program feel more enteprisy!
class Enterprisifier
def self.enterprisify!
sleep 5
end
end
@iagooar
iagooar / Dockerfile
Created March 5, 2016 11:00
Tiny Go microservice plumbing
FROM alpine:3.2
ENV GOROOT=/usr/lib/go \
GOPATH=/gopath \
GOBIN=/gopath/bin \
PATH=$PATH:$GOROOT/bin:$GOPATH/bin
WORKDIR /gopath/src/app
ADD . /gopath/src/app
@iagooar
iagooar / Dockerfile
Last active March 5, 2016 09:23 — forked from shijuvar/main.go
A simple microservice plumbing in Go
FROM google/golang:stable
# Godep for vendoring
RUN go get github.com/tools/godep
# Recompile the standard library without CGO
RUN CGO_ENABLED=0 go install -a std
MAINTAINER [email protected]
ENV APP_DIR $GOPATH/Users/mati/deindeal/moosehead/modules/newsletter_feeds
# Set the entrypoint
@iagooar
iagooar / gist:ca41d70da79239ffbfe8
Created July 2, 2015 12:46
Github labels / states
Review finished - expecting dev input
Feedback considered - expecting review
Code accepted - Ready for QA
QA pending
QA validated
QA rejected - expecting dev input
Ship it
@iagooar
iagooar / routes.rb
Last active August 29, 2015 14:24
Splitting routes into modules
YourApplication::Application.routes.draw do
root to: 'home#index'
get '/about'
get '/login' => 'application#login'
end
ADDITIONAL_ROUTES = [:messages, :orders, :api, :admin]
ADDITIONAL_ROUTES.each do |route_file|
require "#{Rails.root}/config/routes/#{route_file}"
end
@iagooar
iagooar / env.rb
Last active August 29, 2015 14:24
Proposal for better ENV usage in Ruby
# Currently, many times we are using ENV variables in a non-optimal way.
# I'd like to explain some of the common use cases for those variables
# and how we can use them in a way that we get the most out of it.
# A common error is to assume that the variable has to be there, but it isn't
# This happens when we use the ENV hash like this:
ENV['SOME_KEY']
# In Ruby, if the key is missing, it will return `nil`, thus calling a method on it
@iagooar
iagooar / memory_cache.rb
Last active August 29, 2015 14:11
In-memory cache with key limit
class MemoryCache
DEFAULT_MAX_KEYS = 5000
attr_reader :data, :max_keys
def initialize(config)
@data = {}
@max_keys = config[:max_cache_keys] || DEFAULT_MAX_KEYS
@lock = Mutex.new