- Video Encoding: https://handbrake.fr/
- Screen broadcasting, virtual screen camera: https://obsproject.com/
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 React from 'react'; | |
| import Editor from '@monaco-editor/react'; | |
| import { format } from 'sql-formatter'; | |
| export type InputEvent = { target: { name: string; value: string } }; | |
| export default function MonacoSqlInput({ | |
| value, | |
| name = '', | |
| height = 500, |
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
| # put this in your ~/.bashrc | |
| gzipped() { | |
| if [ -z $1 ]; then | |
| echo "No file specified" | |
| else | |
| b=$(gzip -c $1 | wc -c) | |
| echo "$b B" | |
| KB=$(awk "BEGIN {printf \"%.2f\n\", $b/1024}") | |
| echo "$KB KB" | |
| MB=$(awk "BEGIN {printf \"%.2f\n\", $b/1024/1024}") |
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
| # local: package version | |
| package_version=$(cat package.json | grep version -m 1 | sed 's/"version": "//' | sed 's/",//' | xargs) | |
| # git: package version | |
| git_package_version=$(git show HEAD^^^:package.json | grep version -m 1 | sed 's/"version": "//' | sed 's/",//' | xargs) | |
| # react-native: current android version | |
| android_version=$(cat android/app/build.gradle | grep versionName | sed 's/versionName "//' | sed 's/"//' | xargs) | |
| android_build=$(awk '/versionCode/ && !/versionCodes/ && /[0-9]+/ {gsub(/[^0-9]/, "", $2); print $2}' android/app/build.gradle) |
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
| #!/bin/sh | |
| # prepends a comment with version info, timestamp and git commit hash | |
| file="./build/embed.js" | |
| timestamp=$(date '+%Y-%m-%d %H:%m:%S') | |
| commithash=$(git rev-parse --short HEAD) | |
| version=$(cat ./package.json | grep version -m 1 | sed 's/"version": "//' | sed 's/",//' | xargs) | |
| buildinfo="$version $timestamp $commithash" |
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
| # put this where you keep custom aliases and functions (e.g. ~/.bashrc or ~/.zshenv) | |
| function nuke-ios() { | |
| for arg in "$@"; do | |
| if [[ "$arg" == "--help" ]] || [[ "$arg" == "-h" ]]; then | |
| echo "nuke-ios: Resets the iOS workspace of a react-native project by deleting temporary artifacts." | |
| echo | |
| echo "Usage:" | |
| echo " nuke-ios [options]" | |
| echo | |
| echo "Options:" |
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
| # codemod function generated by codemod AI to allow using ast-grep with autocomplete for local rules | |
| # opted for macos + zshell | |
| # use some AI to make it work on bash/linux/windows?? | |
| codemod() { | |
| local start_time=$(date +%s.%N) | |
| local write_mode=false | |
| local args=() | |
| # Parse all arguments, extracting --write and keeping others |
OlderNewer