Skip to content

Instantly share code, notes, and snippets.

View nandofalcao's full-sized avatar
🧑‍💻

Fernando Falcao nandofalcao

🧑‍💻
View GitHub Profile
@nandofalcao
nandofalcao / extensions.json
Last active March 5, 2025 05:10
VSCode Settings
{
"recommendations": [
"aaron-bond.better-comments",
"alefragnani.project-manager",
"aslamanver.vsc-export",
"bradlc.vscode-tailwindcss",
"chadalen.vscode-jetbrains-icon-theme",
"codezombiech.gitignore",
"dbaeumer.vscode-eslint",
"enkia.tokyo-night",
@dhh
dhh / linux-setup.sh
Last active April 28, 2025 16:30
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
@nandofalcao
nandofalcao / jest-test-tips.md
Last active June 12, 2022 00:35
Jest Best Practices - What is the difference between 'it' and 'test' in Jest?

What is the difference between 'it' and 'test' in Jest?

test

What you write:

describe('yourModule', () => {
  test('if it does this thing', () => {});
  test('if it does the other thing', () => {});
});
@nandofalcao
nandofalcao / extensions.jsonc
Last active May 29, 2022 04:09
VSCode Best Extensions Recommendations
{
"recommendations": [
// BASE
// ====================================
"alefragnani.project-manager",
"sleistner.vscode-fileutils",
// MY EXTENSIONS
"GitHub.github-vscode-theme",
"PKief.material-icon-theme",
@nandofalcao
nandofalcao / http-status-code.txt
Created August 7, 2021 02:10
HTTP Status Code Definitions
Categories:
1xx - Informational
2xx - Success
3xx - Redirection
4xx - Client Error
5xx - Server Error
Status Code Definitions:
@dasniko
dasniko / create_x509_certs.md
Last active April 28, 2025 02:43
Creating self signed tls certificates with self-signed root CA
@nandofalcao
nandofalcao / postgres-snippets.md
Last active April 13, 2021 18:10
Postgres Snippets

Snippets

CREATE TABLE "table_name" (
    "id" uuid DEFAULT uuid_generate_v4(),
    "created_at" TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    "updated_at" TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    PRIMARY KEY ("column", "other_column"),
    UNIQUE ("column", "other_column"),
    FOREIGN KEY ("column") REFERENCES "other_table_name"("column"),
 FOREIGN KEY ("column") REFERENCES "other_table_name"("column") ON DELETE CASCADE,
@nandofalcao
nandofalcao / flutter-cheat-sheet.md
Last active March 1, 2021 05:16
Flutter Cheat Sheet

Get Status Bar Height

MediaQuery.of(context).padding.top;

Get AppBar Height

AppBar _appBar = AppBar();
_appBar.preferredSize.height;
@alexander-young
alexander-young / index.php
Created December 1, 2020 21:41
WordPress Custom Queries Example
// Get Posts
$posts = get_posts([
'post_type' => 'press-release',
'posts_per_page' => 25,
'category' => 4,
]);
foreach($posts as $post){
setup_postdata($post);
@alexander-young
alexander-young / functions.php
Created January 15, 2020 02:32
Defer Javascript in WordPress
function defer_parsing_of_js($url)
{
if (is_admin()) return $url; //don't break WP Admin
if (false === strpos($url, '.js')) return $url;
if (strpos($url, 'jquery.js')) return $url;
return str_replace(' src', ' defer src', $url);
}
add_filter('script_loader_tag', 'defer_parsing_of_js', 10);