This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[UserDefinedGestures] | |
UserDefinedGestures=~OpenBracket~~Quote~BindingContext~Quote~:~Quote~EditorViewportClient~Quote~,~Quote~CommandName~Quote~:~Quote~Forward~Quote~,~Quote~Control~Quote~:false,~Quote~Alt~Quote~:false,~Quote~Shift~Quote~:false,~Quote~Command~Quote~:false,~Quote~Key~Quote~:~Quote~Z~Quote~~CloseBracket~ | |
UserDefinedGestures=~OpenBracket~~Quote~BindingContext~Quote~:~Quote~EditorViewportClient~Quote~,~Quote~CommandName~Quote~:~Quote~FovZoomOut~Quote~,~Quote~Control~Quote~:false,~Quote~Alt~Quote~:false,~Quote~Shift~Quote~:false,~Quote~Command~Quote~:false,~Quote~Key~Quote~:~Quote~W~Quote~~CloseBracket~ | |
UserDefinedGestures=~OpenBracket~~Quote~BindingContext~Quote~:~Quote~EditorViewportClient~Quote~,~Quote~CommandName~Quote~:~Quote~Left~Quote~,~Quote~Control~Quote~:false,~Quote~Alt~Quote~:false,~Quote~Shift~Quote~:false,~Quote~Command~Quote~:false,~Quote~Key~Quote~:~Quote~Q~Quote~~CloseBracket~ | |
UserDefinedGestures=~OpenBracket~~Quote~BindingContext~Quote~:~Quote~EditorViewportClient~Quote~,~Quote~C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# skippy-wrapper - B. Murphy | |
# | |
# a work around for the bug in skippy-xd that prevents minimized | |
# windows being included in the selection screen. | |
# | |
# dependency: xdotool | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy this to ~/.config/skippy-xd/skippy-xd.rc and edit it to your liking | |
# | |
# Notes: | |
# | |
# - colors can be anything XAllocNamedColor can handle | |
# (like "black" or "#000000") | |
# | |
# - distance is a relative number, and is scaled according to the scale | |
# factor applied to windows | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
/* =Config | |
*------------------------------------------------------------*/ | |
$FONT_PATH = "OpenSans-Regular.ttf"; | |
/* pixels */ | |
$CELL_WIDTH_IDEAL = 100; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Youtube - Copy short URL to clipboard | |
// @namespace lleaff | |
// @supportURL https://gist.github.com/lleaff/48db35c180ab1b684a0f2c7d9c493244#comments | |
// @match https://www.youtube.com/* | |
// @version 2 | |
// @run-at document-end | |
// @grant GM_setClipboard | |
// @noframes | |
// @description Copy short URL to clipboard on video title click |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Slice an array every n elements. Don't leave out any elements from source array or | |
* empty spaces in the resulting slices. | |
* @example | |
* arraySliceEveryN([1,2,3,4,5,6,7], 3) | |
* //=> [[1,4,7],[2,5],[3,6]] | |
*/ | |
function arraySliceEveryN(array, n) { | |
let slices = Array(n); | |
const min_len = Math.floor(array.length / n); // Length without remaining elements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Discord - Open chat in popup | |
// @namespace lleaff | |
// @updateURL https://gist.github.com/lleaff/8514033dc8e54ce02d6adf3c2e46d8ff/raw/Discord_-_Open_chat_in_popup.user.js | |
// @supportURL https://gist.github.com/lleaff/8514033dc8e54ce02d6adf3c2e46d8ff#comments | |
// @match https://discordapp.com/channels/* | |
// @version 1 | |
// @run-at document-end | |
// @grant none | |
// @noframes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const last = a => a[a.length - 1]; | |
const mergeConsecutive = (arr, el) => (arr.length <= 1) ? | |
arr : | |
arr.slice(1).reduce((p, v) => v === el && last(p) === v ? | |
p : | |
[...p, v], [arr[0]]); | |
const mergeConsecutiveElements = arr => (arr.length <= 1) ? | |
arr : | |
arr.slice(1).reduce((p, v) => last(p) === v ? p : [...p, v], [arr[0]]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Compile: | |
* gcc -Wall -Werror -pedantic -ansi -std=c89 readnum.c | |
*/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <unistd.h> |
OlderNewer