Skip to content

Instantly share code, notes, and snippets.

View solesensei's full-sized avatar
on a coffee break

Dima Goncharenko solesensei

on a coffee break
View GitHub Profile
@bobheadxi
bobheadxi / Copy Obsidian global graph colors to local graphs.md
Last active February 5, 2024 06:28
Sync Obsidian global graph settings to local graphs

[[Obsidian]] local graphs don't inherit global graph settings as of [[2021-06-28]], which can make for an inconsistent experience. Relevant feature request: Colour group settings apply to both global and local graphs Obsidian Forum

[[JSON]] local graph config is stored in .obsidian/workspace, and global graph config is stored in .obsidian/graph.json, so we can sync settings by editing the configuration directly.

First, open a local graph view and close Obsidian (it seems like Obsidian prefers its own configuration to whatever is on disk when it is running). Then, either [[#Sync all graph settings]] or [[#Sync specific graph settings]]. Once done, open Obsidian and your local graph should look the same as your global graph!

Sync all graph settings

We rewrite configuration using [[Comby]].

@sorny
sorny / x11_forwarding_macos_docker.md
Last active May 15, 2024 08:29
X11 forwarding with macOS and Docker

X11 forwarding on macOS and docker

A quick guide on how to setup X11 forwarding on macOS when using docker containers requiring a DISPLAY. Works on both Intel and M1 macs!

This guide was tested on:

  • macOS Catalina 10.15.4
  • docker desktop 2.2.0.5 (43884) - stable release
  • XQuartz 2.7.11 (xorg-server 1.18.4)
  • Macbook Pro (Intel)
@ameenkhan07
ameenkhan07 / FB-PE-InterviewTips.md
Last active June 9, 2024 03:24
Facebook Production Engineering Interview

What to Expect and Tips

• 45-minute systems interview, focus on responding to real world problems with an unhealthy service, such as a web server or database. The interview will start off at a high level troubleshooting a likely scenario, dig deeper to find the cause and some possible solutions for it. The goal is to probe your knowledge of systems at scale and under load, so keep in mind the challenges of the Facebook environment.
• Focus on things such as tooling, memory management and unix process lifecycle.

Systems

More specifically, linux troubleshooting and debugging. Understanding things like memory, io, cpu, shell, memory etc. would be pretty helpful. Knowing how to actually write a unix shell would also be a good idea. What tools might you use to debug something? On another note, this interview will likely push your boundaries of what you know (and how to implement it).

Design/Architecture 

Interview is all about taking an ambiguous question of how you might build a system and letting

@jaredLunde
jaredLunde / async_lru.py
Last active June 7, 2022 10:09
An LRU cache for asyncio coroutines in Python 3.5
import asyncio
import functools
from collections import OrderedDict
def async_lru(size=100):
cache = OrderedDict()
def decorator(fn):
@functools.wraps(fn)