This file contains hidden or 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
| # find package manager by looking for lockfiles in current and parent directories | |
| function find-pkg-manager() { | |
| local dir="$PWD" | |
| while [ "$dir" != "/" ]; do | |
| if [ -f "$dir/bun.lockb" ]; then | |
| echo "bun|$dir/bun.lockb" | |
| return 0 | |
| elif [ -f "$dir/pnpm-lock.yaml" ]; then | |
| echo "pnpm|$dir/pnpm-lock.yaml" | |
| return 0 |
This file contains hidden or 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
| /* eslint-disable no-color-literals */ | |
| // ==UserScript== | |
| // @name Metabase dev stuff | |
| // @namespace Violentmonkey Scripts | |
| // @version 1.3 | |
| // @description Fills forms and do things | |
| // @author Your Name | |
| // @match *://*/* | |
| // @grant GM_registerMenuCommand | |
| // @grant GM_setValue |
This file contains hidden or 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 Universal Link Copier (GitHub, Notion, and Others) | |
| // @namespace ViolentMonkey Scripts | |
| // @version 1.3 | |
| // @description Copy the link with relevant information from GitHub issues, pull requests, and other pages when nothing is selected and cmd+c is pressed. | |
| // @author You | |
| // @match *://github.com/*/*/* | |
| // @match *://notion.so/* | |
| // @match *://*/* | |
| // @grant none |
This file contains hidden or 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
Show hidden characters
| { | |
| "console log with typeof": { | |
| "prefix": ["clt"], | |
| "body": ["console.log(\"$0\", typeof $0, $0)"], | |
| "description": "console log with typeof" | |
| } | |
| } |
This file contains hidden or 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
| body, | |
| body * { | |
| background-color: #1e1e1e !important; | |
| color: #e1e1e1 !important; | |
| } | |
| h1,h2,h3,h4,h5,h6,h7 { | |
| color: #9d5c63 !important; | |
| } |
This file contains hidden or 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
| // v this will probably change every figma deploy | |
| const styles = [...document.querySelectorAll('.style_icon--styleIcon--3-PzQ')] | |
| const colors = styles.map(style =>{ | |
| try { | |
| const name = style.attributes['data-tooltip-style-name'].value.split(" ")[2] | |
| const rgb = style.children[0].children[0].style.backgroundColor |
This file contains hidden or 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
| { | |
| "testID interface props interface": { | |
| "prefix": ["tii"], // [t]est [i]d [i]nterface | |
| "body": ["testID?: string;"], | |
| "description": "testID ts interface" | |
| }, | |
| "testID prop forwarding": { | |
| "prefix": ["tip"], // [t]est [i]d [p]rop | |
| "body": ["testID={this.props.testID}"], |
This file contains hidden or 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 chokidar = require("chokidar"); | |
| const { spawn } = require("child_process"); | |
| const compilerPort = 6066; | |
| // TODO: | |
| // [ ] start compilation server | |
| // [ ] use compilation server | |
| // [ ] parse paths in stdout and add cwd so they can be clicked | |
| // [ ] proper support for openfl / assets (run openfl build only when assets change) |
This file contains hidden or 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
| queryString.split("&").map(string => string.split("=")).reduce((params,[key,value]) => ({...params, [key]:value}),{}) |
This file contains hidden or 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
| var path = process.argv[2]; | |
| console.log(`reading file ${path}`) | |
| console.log(`Date, Memory`) | |
| var lineReader = require('readline').createInterface({ | |
| input: require('fs').createReadStream(path) | |
| }); | |
| var regexp = /(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}).*Memory : (\d*)MB/g; |
NewerOlder