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
# Makes Powershell tab completion work like Bash | |
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete | |
# Imports posh-git | |
Import-Module posh-git | |
$GitPromptSettings.DefaultPromptPrefix.Text = '$(Get-Date -f "MM-dd HH:mm:ss") ' | |
$GitPromptSettings.DefaultPromptPrefix.ForegroundColor = 0x3891b7 | |
$GitPromptSettings.DefaultPromptAbbreviateHomeDirectory = $true |
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
[core] | |
autocrlf = false | |
eol = lf | |
[user] | |
email = noreply@skoshy.com | |
name = Stefan Koshy | |
[alias] | |
# Thanks to https://gist.github.com/robmiller/6018582 for many of these | |
# Basic |
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
env: | |
node: true # this is the best starting point | |
browser: true # for react web | |
es6: true # enables es6 features | |
parser: "babel-eslint" # needed to make babel stuff work properly | |
parserOptions: | |
ecmaVersion: 6 | |
sourceType: module | |
ecmaFeatures: | |
jsx: true |
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
Input | parseInt(i) || 0 | +i || 0 | i | 0 | Notes | |
---|---|---|---|---|---|
'1' | 1 | 1 | 1 | ||
'4s' | 4 | 0 | 0 | ||
'45734584574354954345444533544354353' | 4.573458457435495e+34 | 4.573458457435495e+34 | 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
delayFunc = (func, {name = Date.now(), duration = 5000, interval = 1000} = {}) => { | |
let logger = (str) => console.log(`[${name}] ${str}`); | |
let iterationCount = 0; | |
let timer = setInterval(() => { | |
iterationCount++; | |
let finished = iterationCount * interval >= duration; | |
logger(`${iterationCount} / ${duration / interval}${finished ? ', Finished!' : ''}`); | |
if (finished) { |
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
/* Run this in the console on https://tailwindcss.com/docs/customizing-colors/ */ | |
toRRGGBBAASuffix = (num) => (num).toString(16).padEnd(4, 0).substr(2,2) | |
opacities = [0.2, 0.4, 0.6, 0.8]; | |
additionalColors = [ | |
['black', '#000000'], | |
['white', '#ffffff'], | |
]; | |
lines = ''; |
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
/*********** | |
This is not a 100% 1:1 mapping to fetch, | |
but it works good enough for most use cases! | |
How to use: | |
Just copy and paste this function into your Userscript. | |
Then, call it as you would normal `fetch`. | |
************/ | |
async function GM_fetch(url, options = {}) { |
OlderNewer