Skip to content

Instantly share code, notes, and snippets.


Radoslav Stankov RStankov

View GitHub Profile
View association_resolver.rb
# 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](

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

View graphql_utils.ts
import { ApolloClient } from 'apollo-boost';
import { get as lodashGet } from 'lodash';
interface INode<T> {
node: T;
interface IHaveNextPage {
pageInfo: {
hasNextPage: boolean;
View eventBus.ts
import * as React from 'react';
import mitt from 'mitt';
type IEventName =
| 'CommentCreated'
| 'CommentDestroy'
type IEventPaload = any;
type IEventHandler = (payload: IEventPaload) => void;
View decorators.tsx
import * as React from 'react';
const BOLD_REGEX = /(^|[^\w])\*\*[^\*]+\*\*($|[^\w])/gi;
const ITALIC_REGEX = /(^|[^\w])(^|[^\*])\*[^\*]+\*($|[^\w])/gi;
const UNDERLINE_REGEX = /(^|[^\w])(^|[^\~])\~[^\~]+\~($|[^\w])/gi;
const STIKE_REGEX = /(^|[^\w])\~\~[^\~]+\~\~($|[^\w])/gi;
function boldStrategy(contentBlock: any, callback: any, _contentState: any) {
findWithRegex(BOLD_REGEX, contentBlock, callback);
View teamplate.rb
module SEO
def self.for(record)
class SEO::Base
attr_reader :record
def initialize(record)
View jest.config.js
const testPathIgnorePatterns = ['/node_modules/', '.next/', 'graphql/'];
module.exports = {
reporters: ['default', 'jest-junit'],
projects: [
runner: 'jest-runner-prettier',
displayName: 'prettier',
moduleFileExtensions: [
View yarn_upgarde.rb
data = `yarn outdated`
data = data.split("\n")
index = data.find_index { |line| line =~ /^Package.*Current.*/ }
if index.nil?
print "No new dependancies\n"
View graph_helper.rb
# frozen_string_literal: true
module SpecSupport
module GraphHelper
def execute_mutation(current_user: nil, context: {}, **inputs)
context =
query: StacksSchema),
values: context.merge(current_user: current_user),
object: nil,