Skip to content

Instantly share code, notes, and snippets.

View tiagomota's full-sized avatar

Tiago Mota tiagomota

  • Porto, Portugal
View GitHub Profile
@tiagomota
tiagomota / cloudflare-ips-alias.md
Last active January 1, 2024 11:46
OPNSense: Custom cron job to automatically update an alias with CloudFlare IPs

OPNSense: Custom cron job to automatically update an alias with CloudFlare IPs

The following steps were done and tested in version 23.7.8_1.

⚠️ Disclaimer: I'm just a regular joe trying to learn and make my life easier at the same time. Use this at your own risk.

1. Create an alias

Go to Firewall > Aliases and add an alias

@tiagomota
tiagomota / one_dark.itermcolors
Last active November 13, 2023 23:47
one_dark.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.16862745583057404</real>

Keybase proof

I hereby claim:

  • I am tiagomota on github.
  • I am tiagomotasb (https://keybase.io/tiagomotasb) on keybase.
  • I have a public key ASBho6KAT4AGvwYkO7AWEFwLfZUo7WS61yjkyaDg4X6zXgo

To claim this, I am signing this object:

@tiagomota
tiagomota / postgres_queries_and_commands.sql
Last active November 9, 2021 23:38 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- enter in postgres user
sudo su postgres
psql
-- clear machine/postgres cache to force fresh disk reads on queries
1. Shutdown the database server --(pg_ctl, sudo service postgresql stop, etc.)
2. echo 3 > /proc/sys/vm/drop_caches --This will clear out the OS file/block caches - very important though I don't know how to do that on other OSs.
3. Start the database server
-- *****************************