Converted to usable .json files: https://github.com/devinrhode2/tsconfigs-by-strictness
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
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby | |
# chmod +x install.rb | |
# ./install.rb | |
YOUR_HOME = ENV['HOME'] | |
HOMEBREW_PREFIX = "#{YOUR_HOME}/usr/local" | |
system "mkdir -p #{HOMEBREW_PREFIX}" | |
HOMEBREW_CACHE = "#{YOUR_HOME}/Library/Caches/Homebrew" | |
HOMEBREW_REPO = 'https://github.com/Homebrew/brew' |
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
// Prettier config to reduce merge conflicts: https://gist.github.com/devinrhode2/08c84e175c61b282b76f4766a94e4a01 | |
/** @type {import('prettier').RequiredOptions} */ | |
module.exports = { | |
singleQuote: true, | |
semi: false, | |
// avoid even more merge conflicts: https://prettier.io/blog/2020/03/21/2.0.0.html#change-default-value-for-trailingcomma-to-es5-6963httpsgithubcomprettierprettierpull6963-by-fiskerhttpsgithubcomfisker | |
trailingComma: 'all', | |
printWidth: 40, |
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
function exceptionalException(message) { | |
'use strict'; | |
if (exceptionalException.emailErrors !== false) { | |
exceptionalException.emailErrors = confirm('We had an error reporting an error! Please email us so we can fix it?'); | |
} | |
} | |
//test | |
//exceptionalException('try 1!'); | |
//exceptionalException('try 2!'); |
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
// https://stackoverflow.com/questions/43004657/modify-the-url-of-a-new-request-object-in-es6 | |
// used to monkey patch a `fetch` call inside some javascript framework. | |
const serverFnFetch: typeof fetch = function (input, init) { | |
const isRequest = input instanceof Request; | |
const currentUrlObj = new URL( | |
isRequest ? input.url : input, | |
location.href, | |
); | |
const currentUrlWithoutOrigin = currentUrlObj |
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
import React from 'react'; | |
import { useCheckoutSessionId } from '../useCheckoutSessionId'; | |
type ComponentThatRequiresCheckoutSessionId<TProps> = ( | |
yourBaseProps: TProps, | |
) => JSX.Element | null; | |
/** Patches return type */ | |
type RemoveProp< |
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
type asdf = HTMLElement; | |
const validateElement = < | |
// eslint-disable-next-line @typescript-eslint/ban-types | |
TInstanceType extends Element, | |
>( | |
node: Element | null, | |
{ | |
nodeNickname, | |
tagName, |
This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x
The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/
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
[alias] | |
add-archive = "!runit() { REFS_BRANCH=`git branch -a --contains $1 | xargs` && \ | |
NEW_REF=`echo refs/archive/$(date '+%Y-%m-%d')/$(git config user.name)/$REFS_BRANCH/$(date '+%s')` && \ | |
git update-ref $NEW_REF $1 && \ | |
echo consider deleting $REFS_BRANCH && \ | |
echo attempting to backup archives && \ | |
git push origin refs/archive/*:refs/archive/* && \ | |
echo Here is your remote commit ref url && \ | |
echo https://github.com/org/repo/commit/$1; }; runit" |
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
/** | |
* Like, basically PERFECT scrollbars | |
*/ | |
/* | |
It's pure CSS. | |
Since a quick google search will confirm people going crazy about Mac OS Lion scrollbars... | |
this has no fade-out effect. | |
In Mac OS Lion, the lowest common denominator is always showing scrollbars by a setting. |
NewerOlder