Skip to content

Instantly share code, notes, and snippets.

View thanhph111's full-sized avatar
💪
Active at work

Thanh Phan thanhph111

💪
Active at work
View GitHub Profile
@thanhph111
thanhph111 / README.md
Last active August 18, 2022 23:16
Batch add recovery codes to 1Password #guide

Batch add recovery codes to 1Password

You want to store your recovery codes to 1Password after setting up one-time password but too lazy to add them manually? Here is the script to automatically do that using 1Password CLI.

  1. First, you need to install 1Password CLI.
  2. Then store your recovery codes line by line in a file named the item ID you want to add, you can find the ID of the item with this command:
op item list
@thanhph111
thanhph111 / render-blender.sh
Last active August 18, 2022 23:17
Bash scripts for replacing annoying rendering status with animated one when rendering Blender using command-line #snippet
#!/bin/bash
function render-blender() {
function write-usage() {
echo "Usage: $0 -i input-path [-o output-file] [-e engine-name]"
echo " -i | --input-file Path to input file"
echo " -o | --output-file Path to output file"
echo " -e | --engine Render engine name"
echo ""
echo "Example: $0 -i $HOME/File.blend -o $HOME/Sample_ -e CYCLES"
exit 1
@thanhph111
thanhph111 / Render-Blender.psm1
Last active August 18, 2022 23:17
PowerShell scripts for replacing annoying rendering status with animated one when rendering Blender using command-line #snippet
function Render-Blender {
param (
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]$InputFile,
[Parameter()]
[string]$OutputFile = "//Render_",
[Parameter(Mandatory = $true)]