Skip to content

Instantly share code, notes, and snippets.

View RStankov's full-sized avatar
🤖
👨‍💻

Radoslav Stankov RStankov

🤖
👨‍💻
View GitHub Profile
@RStankov
RStankov / emergency_kit.md
Created March 7, 2024 19:38
⛑️ Emergency Kit

⛑️ Emergency Kit

🎥 Video walkthrough of emergency handling `[VIDEO IN TOOL LIKE LOOM]`

Tools

@RStankov
RStankov / template_postmortem.md
Created March 7, 2024 17:26
Post postmortem template

[REPLACE TITLE] Postmortem

Summary:

[TLD of what happened]

Responders:

[who handled the issue]

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>Menu</title>
<style>
.wrapper {
margin-left: auto;
margin-right: auto;
@RStankov
RStankov / container.tsx
Created February 21, 2024 21:22
Modal System
// The most complex part of the modal system
// There are lot of small details heres
// I extracted this from a real project
// Notice: Hooks hide a lot of complexity
import { IModalOpen } from './types';
import { closeModal } from './triggers';
import { useEffect, useMemo, useRef, useState } from 'react';
import { useEventBus } from '../eventBus';
import { InsideModalProvider } from './context';
import * as React from 'react';
import mitt from 'mitt';
interface IEventsMap {
modalOpen: {
content: React.ReactNode;
url?: string;
};
modalClose: null;
class Controller < ActionController::Base
include DevelopmentLogging if Rails.env.development?
end
<?php
/*
Original version:
written by Jarrod Oberto
taken from http://net.tutsplus.com/tutorials/php/image-resizing-made-easy-with-php/
Example usage:
include("classes/Resize.php");
# frozen_string_literal: true
# Complex counter counter caches
#
# Usage:
#
# In parent model
# class Post < ApplicationRecord
# ExplicitCounterCache.define(self, votes_count, -> { votes.active })
# ExplicitCounterCache.define(self, comments_count, -> { votes.visible })
# frozen_string_literal: true
# Note(rstankov):
#
# **Don't use for `connection`s, only for `field` attributes**
#
# Preload associations.
#
# Supports all preload formats from [ActiveRecord::Base.includes](https://api.rubyonrails.org/v5.2.4/classes/ActiveRecord/QueryMethods.html#method-i-includes).
#

We are searching for Team Lead to work with product managers, designers, and engineers to shape product direction and deliver great features.

Your responsibilities will include

  • Managing and mentoring your fellow engineers
  • Collaborating closely with product and designer to ship great products
  • Driving your team roadmap, from conception to production
  • Leveraging research and usage data to iterate on these products
  • Brainstorming architecture and product decisions with the team.

How would you spend your time