:bf # Go to first file.
:bl # Go to last file
:bn # Go to next file.
:bp # Go to previous file.
:bw # Close file.
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 getRowText(t,e){return t.querySelector(e).innerText.trim()}let csgo=document.querySelectorAll("#match-list-outer > table > tbody > tr"),csgoMatches=[...csgo].map(t=>({date:getRowText(t,"td:nth-of-type(1)"),map:getRowText(t,"td:nth-of-type(3)"),score:getRowText(t,"td:nth-of-type(4)"),kills:+getRowText(t,"td.col-stats:nth-of-type(7)"),deaths:+getRowText(t,"td.col-stats:nth-of-type(8)"),diff:+getRowText(t,"td.col-stats:nth-of-type(10)"),rating:+getRowText(t,"td:nth-last-child(2)")}));function filterMatches(t="date"){const e=Object.keys(csgoMatches[0]);if(!e.some(e=>e===t))throw Error(`Invalid filter. Try using: ${e.join(", ")}. You could also just run it without a filter.`);return csgoMatches.sort((e,o)=>o[t]-e[t])} |
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 { useEffect } from 'react' | |
type ElementRef = null | { | |
current: HTMLElement | null | |
} | |
function useClickOutside(ref: ElementRef, handler: any) { | |
useEffect(() => { | |
const listener = (event: any) => { | |
if (!ref!.current || ref!.current.contains(event.target)) { |
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 canvas = document.querySelector("canvas"); | |
const canvasUrl = canvas.toDataURL(); | |
window.location = canvas | |
.toDataURL("image/png") | |
.replace("image/png", "image/octet-stream"); |
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
export ZSH="/home/vaporwavie/.oh-my-zsh" | |
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
source /home/vaporwavie/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | |
ZSH_THEME="lambda-mod" | |
plugins=( | |
git |
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
// craco.config.js | |
module.exports = { | |
webpack: { | |
configure: { | |
output: { | |
filename: 'static/js/[name].js', | |
}, | |
optimization: { | |
runtimeChunk: false, | |
splitChunks: { |
I hereby claim:
- I am vaporwavie on github.
- I am vaporwavie (https://keybase.io/vaporwavie) on keybase.
- I have a public key ASBkKjO-CzeS1Lif-_oqg6FBCaJP-bwzJd1B-CXGhMosmwo
To claim this, I am signing this object:
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/sh | |
BRANCH_NAME=$(git branch 2>/dev/null | grep -e ^* | tr -d ' *' | sed 's:.*/::') | |
if [ -n "$BRANCH_NAME" ]; then | |
echo "$BRANCH_NAME: $(cat $1)" > $1 | |
fi |
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
// store.tsx | |
import { AppState } from 'types' // local lib | |
import { | |
useSelector as useReduxSelector, // mask useSelector first import | |
TypedUseSelectorHook, // declare use selector generic types | |
} from 'react-redux' | |
import { configureStore } from '@reduxjs/toolkit' | |
import reducer from './reducers' |
NewerOlder