Skip to content

Instantly share code, notes, and snippets.

View valmayaki's full-sized avatar
🀠
Happy to be of service to you!

Valentine Ubani Mayaki valmayaki

🀠
Happy to be of service to you!
View GitHub Profile
@valmayaki
valmayaki / create_admin_user.sql
Created April 10, 2025 06:57 — forked from poacosta/create_admin_user.sql
Create users and grant permissions in PostgreSQL
-- The below query is used to fetch all the role names from the 'pg_roles' system catalog table.
-- It will return a list of all user (role) names in the current PostgreSQL database.
SELECT rolname FROM pg_roles;
-- This command is used to create a new PostgreSQL user with the specified username and password.
-- In this case, the newly created username is 'username' and the password is 'P@55w0rd'.
CREATE USER username WITH PASSWORD 'P@55w0rd';
-- This command grants all privileges to the user 'username' on the database 'dbname'.
-- These privileges include SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER, CREATE, CONNECT, TEMPORARY, EXECUTE, and USAGE
@valmayaki
valmayaki / netsh.txt
Created March 5, 2025 16:21 — forked from alirezanet/netsh.txt
netsh ip/port forwarding sample
add forwarding interface:
netsh interface portproxy add v4tov4 listenport={srcPort} listenaddress={srcIp} connectport={DesPort} connectaddress={DesIp}
show interface:
netsh interface portproxy show v4tov4
delete interface:
netsh interface portproxy delete v4tov4 listenport={srcPort} listenaddress={srcIp}
-----------------------------
@valmayaki
valmayaki / README.md
Created February 19, 2025 21:54 — forked from michaelsieminski/AppServiceProvider.php
Modern PHP Tooling

Modern PHP Tooling

This is my personal collection of modern PHP Tooling that I setup for all of my Laravel projects.

Linting

  1. Pint - Formatting
  1. PeckPHP - Fix Typos
@valmayaki
valmayaki / obsidian-meeting-moc.txt
Created February 14, 2025 18:38 — forked from dannberg/obsidian-meeting-moc.txt
Dann Berg's Meeting MOC document for Obsidian. Full instructions for implementation here: https://dannb.org/blog/2023/obsidian-meeting-note-template/. See the YouTube tutorial here: https://youtu.be/Ud16HOQoS5Q
[[+Home]] %% tags:: #MOC %%
# Meetings MOC
Meetings are timestamped events with other people, where information is exchanged and collected. Meeting notes are intrinsically ephemeral. They're stored in a separate Space than other Umami notes (`Timestamps/Meetings`) and rarely reviewed. If there's information in a meeting that needs to be accessed later, it should be moved into a more evergreen note in the Umami folder.
**Template:** [[Template, Meeting]]
```meta-bind-button
label: New Meeting
hidden: false
@valmayaki
valmayaki / obsidian-daily-note-template.txt
Created February 12, 2025 09:59 — forked from dannberg/obsidian-daily-note-template.txt
Dann Berg's Daily Note Template for Obsidian. Uses Dataview & Templater plugins. Should be saved as a Markdown file in Obsidian. Read the full tour: https://dannb.org/blog/2022/obsidian-daily-note-template/
---
created: <% tp.file.creation_date() %>
---
tags:: [[+Daily Notes]]
# <% moment(tp.file.title,'YYYY-MM-DD').format("dddd, MMMM DD, YYYY") %>
<< [[Timestamps/<% tp.date.now("YYYY", -1) %>/<% tp.date.now("MM-MMMM", -1) %>/<% tp.date.now("YYYY-MM-DD-dddd", -1) %>|Yesterday]] | [[Timestamps/<% tp.date.now("YYYY", 1) %>/<% tp.date.now("MM-MMMM", 1) %>/<% tp.date.now("YYYY-MM-DD-dddd", 1) %>|Tomorrow]] >>
---
@valmayaki
valmayaki / Docker with XDebug.md
Created February 6, 2025 12:14 — forked from megahirt/Docker with XDebug.md
Debugging PHP with XDebug v3 inside Docker using VSCode

Debugging PHP with XDebug v3 inside Docker using VSCode

Assumptions / Prerequisites

  • XDebug v3+ inside Docker (e.g. php:7.3-apache Docker image)
  • Running Docker v20.10+
  • VSCode with PHP Debug Extension (Felix Becker)
  • Using Docker Compose for orchestration

Objective

@valmayaki
valmayaki / docker_compose_assume_iam_role.sh
Created February 4, 2025 20:56 — forked from jzwiep/docker_compose_assume_iam_role.sh
Assume a specific IAM role with a container via docker-compose
#!/bin/bash
# Assume the role using locally configured AWS credentials, then pass the assumed role to the container via environment
# variables!
ASSUMED_ROLE=$(aws sts assume-role \
--role-arn "arn:aws:iam::000000000000:role/our-role-to-assume" \
--role-session-name "session_name" \
--output text)
@valmayaki
valmayaki / gist:0a895649535a0fc46cbabdb9a496cb5d
Created September 20, 2024 00:23 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@valmayaki
valmayaki / windows-keys.md
Created August 9, 2024 16:07 — forked from rvrsh3ll/windows-keys.md
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@valmayaki
valmayaki / mouse.json
Created April 29, 2024 17:34
Karabiner config for using only mouse for switching between spaces and mission control (virtual modifiers)
{
"description": "Maps button 5 and 4 as modifiers for button 1 and 2 to switch spaces and desktops",
"manipulators": [
{
"type": "basic",
"from": {
"pointing_button": "button4",
"modifiers": {
"mandatory": [],
"optional": [