A script to fix EDID problems on external monitors in macOS.
-
Connect only the problem display.
-
Create this directory structure (if it doesn't already exist):
from __future__ import absolute_import | |
import signal | |
import gevent | |
import gevent.pool | |
from rq import Worker | |
from rq.timeouts import BaseDeathPenalty, JobTimeoutException | |
from rq.worker import StopRequested, green, blue | |
from rq.exceptions import DequeueTimeout |
#!/usr/bin/lua5.1 | |
--- Async/Await for Lua 5.1 | |
-- This script implements async/await functions for Lua, allowing tasks to | |
-- be queued and scheduled independently. | |
-- | |
-- This is just an example and has a bunch of issues, isn't tested, isn't | |
-- even actually used anywhere; I basically just got bored and had one of | |
-- those "what if?" type ideas 6 hours ago. | |
local co_create = coroutine.create |
Functions that allow you to call a function not more than once in a given timeframe.
This can be illustrated with timing diagrams. In the following diagrams, f
designates call to the throttled function, t
is the period where the timer is running, and x
shows you the actual execution point of the throttled function.
f 1 2 3 4 5 6
-- put this file somewhere in your nvim config, like: ~/.config/nvim/lua/config/lua-lsp.lua | |
-- usage: require'lspconfig'.sumneko_lua.setup(require("config.lua-lsp")) | |
local library = {} | |
local path = vim.split(package.path, ";") | |
-- this is the ONLY correct way to setup your path | |
table.insert(path, "lua/?.lua") | |
table.insert(path, "lua/?/init.lua") |
This document provides a comprehensive guide on using the tracing::instrument
macro in Rust. It covers the basics of the tracing
crate, the purpose and functioning of the instrument
macro, and best practices for its effective use in software development.
Overview: The tracing
crate is a collection of Rust libraries for application-level tracing and asynchronous diagnostics. It provides a framework for collecting structured, event-based diagnostic information. The instrument
macro, specifically, is a part of this crate. It automatically attaches context-specific information to logs, such as function arguments and return values, making it easier to track the flow and performance of the code.
Purpose: The primary purpose of the tracing::instrument
macro is to aid in diagnostics and performance analysis. By annotating functions with this macro, developers can automatic