Skip to content

Instantly share code, notes, and snippets.

@agmm
agmm / logseq-custom-snippet.css
Last active February 21, 2022 17:09
Logseq Custom CSS Snippet
/* Hide the help FAB */
.cp__sidebar-help-btn {
display: none;
}
/* Reduce the maximum content width */
:root {
--ls-main-content-max-width: 666px;
}
@agmm
agmm / obsidian-ios-sync.md
Last active April 22, 2024 09:33
How to sync Obsidian Notes on iOS

⚠️ To prevent data loss make sure you understand how rclone sync and rclone copy work.

How to sync Obsidian Notes on iOS

  1. Download iSH from the AppStore

  2. Open iSH and install rclone and nano with the following command:

apk add rclone nano
@agmm
agmm / touchid-sudo.md
Last active January 12, 2022 21:38
Touch ID for sudo

How to use Touch ID for sudo access

  1. The first step is to open /etc/pam.d/sudo with sudo privileges.
sudo nano /etc/pam.d/sudo
  1. The next step is to add the following line to the top of the previous file.
@agmm
agmm / ish-mount-ios.sh
Last active January 13, 2022 16:18
Mount in iOS
mount -t ios . directory
sudo powermetrics | grep temp
diskutil list
diskutil mount /dev/disk1s2
diskutil unmount /dev/disk1s2
diskutil apfs unlockVolume /dev/disk1s2
@agmm
agmm / lock-screen-state.sh
Created October 17, 2021 19:56
lock-screen-state
function screenIsLocked { [ "$(/usr/libexec/PlistBuddy -c "print :IOConsoleUsers:0:CGSSessionScreenIsLocked" /dev/stdin 2>/dev/null <<< "$(ioreg -n Root -d1 -a)")" = "true" ] && return 0 || return 1; }
function screenIsUnlocked { [ "$(/usr/libexec/PlistBuddy -c "print :IOConsoleUsers:0:CGSSessionScreenIsLocked" /dev/stdin 2>/dev/null <<< "$(ioreg -n Root -d1 -a)")" != "true" ] && return 0 || return 1; }
@agmm
agmm / rssi.sh
Created October 16, 2021 21:59
Get RSSI (MacOS)
system_profiler SPBluetoothDataType | grep RSSI
@agmm
agmm / puerto-rico-municipalities.csv
Created October 7, 2021 12:58
Lista de municipios de Puerto Rico (CSV)
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
municipio
Adjuntas
Aguada
Aguadilla
Aguas Buenas
Aibonito
Añasco
Arecibo
Arroyo
Barceloneta
@agmm
agmm / puerto-rico-municipalities.json
Created October 7, 2021 12:56
Lista de municipios de Puerto Rico (JSON)
[
"Adjuntas",
"Aguada",
"Aguadilla",
"Aguas Buenas",
"Aibonito",
"Arecibo",
"Arroyo",
"Añasco",
"Barceloneta",