Skip to content

Instantly share code, notes, and snippets.

View nusserstudios's full-sized avatar

Nusser Studios nusserstudios

View GitHub Profile
@nusserstudios
nusserstudios / nvmCommands.js
Created November 12, 2024 19:29 — forked from chranderson/nvmCommands.js
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@nusserstudios
nusserstudios / gist:2850ebf5bd94548e1ccdf02d97e36614
Created March 12, 2024 21:24
WordPress Yoast ACF Field in Title or Meta Description
%%cf_ADD-YOUR-ACF-FIELD-NAME-HERE%%
@nusserstudios
nusserstudios / wp-auto-title-alt-from-img-function
Created August 9, 2023 10:37
WordPress - automatically set the image Title, Alt-Text, Caption & Description upon upload
/*
Automatically set the image Title, Alt-Text, Caption & Description upon upload
https://brutalbusiness.com/automatically-set-the-wordpress-image-title-alt-text-other-meta/
*/
add_action( 'add_attachment', 'bf_set_image_meta_upon_image_upload' );
function bf_set_image_meta_upon_image_upload( $post_ID ) {
// Check if uploaded file is an image, else do nothing
if ( wp_attachment_is_image( $post_ID ) ) {
$my_image_title = get_post( $post_ID )->post_title;
// Sanitize the title: remove hyphens, underscores & extra spaces:
<?php if( get_field('field_name') ): ?>
<?php the_field('field_name'); ?>
<?php endif; ?>
### Keybase proof
I hereby claim:
* I am nusserstudios on github.
* I am nusserstudios (https://keybase.io/nusserstudios) on keybase.
* I have a public key whose fingerprint is 0F1F 1EBF 39ED 1483 1C26 7126 C661 1069 AB00 7518
To claim this, I am signing this object:
@nusserstudios
nusserstudios / vercel.json
Created November 2, 2022 06:10
Hugo vercel.json
{
"build": {
"env": {
"HUGO_VERSION": "0.105.0"
}
},
"headers": [
{
"source": "/(.*)",
"headers": [
ffmpeg -y -fflags +genpts -use_wallclock_as_timestamps 1 -i "in.mkv" -analyzeduration 100M -probesize 100M -max_muxing_queue_size 9999 -map 0:v -map 0:a -map 0:s? -c:s copy -c:a copy -pix_fmt yuv420p10le -vf scale=out_color_matrix=bt2020:out_h_chr_pos=0:out_v_chr_pos=0,format=yuv420p10 -c:v libx265 -preset slow -x265-params "high-tier=1:level-idc=5.1:open-gop=1:crf=22:crf-min=5:crf-max=40:aq-mode=1:colorprim=bt2020:colormatrix=bt2020nc:transfer=smpte2084:colormatrix=bt2020nc:hdr=1:hdr=1:info=1:repeat-headers=1:max-cll=0,0:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(12000000,200)" "out.mkv"
host *
IgnoreUnknown UseKeychain
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/key_name
@nusserstudios
nusserstudios / ssh.sh
Created August 19, 2020 23:46 — forked from zircote/ssh.sh
Convert a AWS PEM into a ssh pub key
ssh-keygen -y -f private_key1.pem > public_key1.pub
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management