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
| val icon: @Composable () -> Unit = if (isMatch) { | |
| { | |
| Icon( | |
| imageVector = Icons.Outlined.CheckCircle, | |
| contentDescription = "DNS location matches your IP", | |
| ) | |
| } | |
| } else { | |
| { | |
| Icon( |
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
| csvcut ~/Downloads/snyk_issues_detail_01_15_2025_97c87958-7f4a-4842-9426-b0435485077e.csv -c 'PROBLEM_ID' | tail -n +2 | xargs -I {} snyk ignore --id='{}' |
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
| [alias] | |
| prune-gone = !git remote prune origin && git branch -v | grep gone | awk '{print $1}' | xargs git branch -D | |
| recent = !git for-each-ref --sort='-authordate:iso8601' --format='%(authordate:relative)%09%(refname:short)' refs/heads | head -15 |
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
| . /usr/local/opt/asdf/libexec/asdf.sh |
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
| jupyter nbconvert --ExecutePreprocessor.timeout=-1 --to notebook --inplace --allow-errors --execute $1 |
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
| import { useContext } from "react" | |
| /** | |
| * A wrapper around `React.useContext` that throws an error if the context | |
| * value is `undefined`, indicating that the component is not wrapped in the | |
| * context provider. | |
| * @param {React.Context} context | |
| * @return {any} The context value. | |
| */ | |
| export const useSafeContext = (context) => { |
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
| // npm install rewire | |
| const rewire = require('rewire'); | |
| const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
| const defaults = rewire('react-scripts/scripts/build.js'); | |
| const config = defaults.__get__('config'); | |
| // Consolidate chunk files instead | |
| config.optimization.splitChunks = { | |
| cacheGroups: { | |
| default: false, |
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
| cat /dev/clipboard | python -c 'import json, sys; json.dump(json.load(sys.stdin), sys.stdout, indent=4, sort_keys=True);' |
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
| rem Place this in C:\Python27\python2.bat | |
| @echo off | |
| set OLDPATH=%PATH% | |
| path C:\Python27;%PATH% | |
| python.exe %* | |
| path %OLDPATH% |
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
| echo "Enter your password:"; read -s pass_str; sha1=$(echo -n $pass_str | tr -d '\n' | openssl sha1); echo "Hash prefix: ${sha1:0:5}"; echo "Hash suffix: ${sha1:5:35}"; result=$(curl https://api.pwnedpasswords.com/range/${sha1:0:5} 2>/dev/null | grep $(echo ${sha1:5:35} | tr '[:lower:]' '[:upper:]')); printf "Your password appeared %d times in the database.\\n" "${result#*:}" 2>/dev/null |
NewerOlder