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") |