Skip to content

Instantly share code, notes, and snippets.

View fabrizziosoares's full-sized avatar

Fabrizzio Soares fabrizziosoares

View GitHub Profile
@fabrizziosoares
fabrizziosoares / macos-assign-to-desktop-from-terminal.md
Created March 16, 2026 17:05 — forked from 0xdevalias/macos-assign-to-desktop-from-terminal.md
The following shows how you can tell macOS to assign an application to always show on all desktops, one specific desktop, or to unbind it.

macOS - Setting 'Assign to Desktop' via Terminal

The following shows how you can tell macOS to assign an application to show on one specific desktop, all desktops, or just a single desktop.

Show Current Config

⇒ defaults read com.apple.spaces app-bindings
@fabrizziosoares
fabrizziosoares / amethyst-layouts.md
Created February 2, 2026 19:00 — forked from bryanculver/amethyst-layouts.md
Custom layouts for Amethyst that arranges windows in four corners or a center focused window and grid-style sides.
@fabrizziosoares
fabrizziosoares / extract-firmware.md
Created August 27, 2024 18:42 — forked from startergo/extract-firmware.md
Extract Firmware from OS X installer
  • Download the full installer:
softwareupdate --list-full-installers
Finding available software
Software Update found the following full installers:
* Title: macOS Ventura, Version: 13.1, Size: 11931164KiB, Build: 22C65
* Title: macOS Ventura, Version: 13.0.1, Size: 11866460KiB, Build: 22A400
* Title: macOS Ventura, Version: 13.0, Size: 11866804KiB, Build: 22A380
* Title: macOS Monterey, Version: 12.6.2, Size: 12104568KiB, Build: 21G320
* Title: macOS Monterey, Version: 12.6.1, Size: 12108491KiB, Build: 21G217
@fabrizziosoares
fabrizziosoares / nut_osx.txt
Created August 15, 2024 16:40 — forked from hdml/nut_osx.txt
Network UPS Tools on macOS High Sierra (netclient)
#install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
#install network ups tools
brew update
brew install nut
#create directories and change permissions
sudo mkdir -p /var/state/ups/upssched/
sudo chown -R `whoami`:nobody /var/state/ups
sudo chmod 775 /var/state/ups/
{
/* ~/Library/KeyBindings/DefaultKeyBinding.dict
See https://gist.github.com/zsimic/1367779, prefix cheatsheet:
Char Short Key
$ S- Shift ⇧
^ C- CTRL ⌃
~ O- Option ⌥ (⊞ Win key position on PC)
@ M- Command ⌘ (Alt position on PC)
# Numeric Keypad
@fabrizziosoares
fabrizziosoares / fixed_table_column_width_aligned_text_demo.tex
Created July 20, 2023 12:20 — forked from LanternD/fixed_table_column_width_aligned_text_demo.tex
LaTeX - Fixed table column width while aligning text left/center/right
\documentclass{article}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\begin{document}
@fabrizziosoares
fabrizziosoares / ubuntu-server-django-guide.rst
Created February 28, 2023 19:15
Ubuntu Server Setup Guide for Django Websites

Conda Commands

Install Anaconda Link: https://www.continuum.io/downloads

  1. Check/List installed packages:
    Conda list

  2. Upgrade Conda packages:
    conda upgrade conda conda upgrade --all

@fabrizziosoares
fabrizziosoares / convert-png-to-icns.sh
Created February 7, 2023 20:03 — forked from 2blon9/convert-png-to-icns.sh
This script can be used for converting png file to icns(MacOS)
#!/bin/sh
# Install `imagemagick` first.
# brew install imagemagick
ICONSETNAME=$1
mkdir $ICONSETNAME.iconset
cp $ICONSETNAME.png $ICONSETNAME.iconset/
cd $ICONSETNAME.iconset
convert -resize 16x16 ../$ICONSETNAME.png icon_16x16.png

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}