Skip to content

Instantly share code, notes, and snippets.

@mitchellwarr
mitchellwarr / function-multiline-arguments.js
Created October 22, 2024 10:28
Eslint function-multiline-arguments
module.exports = {
rules: {
'function-multiline-arguments': {
meta: {
type: 'layout',
fixable: 'code',
schema: [] // no options
},
create: context => ({
CallExpression: node => {
@ilikerobots
ilikerobots / main.dart
Last active June 21, 2022 10:45
Basic examples: Dart call() and Function.apply()
class Adder implements Function {
call(int a, int b) => a + b;
}
class Incrementer implements Function {
int _amt;
Incrementer(this._amt);
call(int a) => a + _amt;
}
@sedm0784
sedm0784 / CapsLockCtrlEscape.ahk
Last active July 27, 2025 05:19
AutoHotkey script to map Caps Lock to Escape when it's pressed on its own and Ctrl when used in combination with another key, à la Steve Losh. Adapted from one that does something similar with the Ctrl Key on the Vim Tips Wiki (http://vim.wikia.com/wiki/Map_caps_lock_to_escape_in_Windows?oldid=32281). (Plus contribs from @randy909 & @mmikeww.)
g_LastCtrlKeyDownTime := 0
g_AbortSendEsc := false
g_ControlRepeatDetected := false
*CapsLock::
if (g_ControlRepeatDetected)
{
return
}