Skip to content

Instantly share code, notes, and snippets.

View meandmax's full-sized avatar
🤠
Be water my friend

Maximilian Heinz meandmax

🤠
Be water my friend
View GitHub Profile
@bholloway
bholloway / regex-template-literal.js
Last active May 21, 2024 12:36
Template literal for multiline regex with comments
/**
* Simple custom template literal that removes comments and whitespace in regex
*/
const regex = ({ raw }, ...substitutions) =>
new RegExp(
String.raw(
{ raw: raw.map(v => v.replace(/\s+#.*$/gm, '').replace(/[\s\r\n]+/g, '')) },
...substitutions,
),
);
@ericelliott
ericelliott / essential-javascript-links.md
Last active November 8, 2024 17:29
Essential JavaScript Links
@staltz
staltz / introrx.md
Last active November 14, 2024 11:27
The introduction to Reactive Programming you've been missing
@ZauberNerd
ZauberNerd / critical-selectors.js
Created March 11, 2014 09:39
Extract all matching selectors for elements above-the-fold.
/* jslint browser:true, devel:true */
(function () {
'use strict';
if (typeof Element.prototype.matches !== 'function') {
var proto = Element.prototype;
var matches = proto.matches ||
proto.webkitMatchesSelector ||
proto.mozMatchesSelector ||
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active November 5, 2024 18:44
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@pksunkara
pksunkara / config
Last active November 15, 2024 16:02
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta