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 / 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": [
@valmayaki
valmayaki / gmailCleanup.js
Created March 1, 2024 18:11 — forked from gabmontes/gmailCleanup.js
Google Apps script to cleanup messages from GMail.
// Inspired in http://www.johneday.com/422/time-based-gmail-filters-with-google-apps-script
// Deletes old marked conversations
function cleanUp() {
var delayDays = 5; // # of days before messages are moved to trash
var label = "Delete me"; // label to identify the messages
var maxDate = new Date(Date.now() - delayDays * 24 * 60 * 60 * 1000);
var userLabel = GmailApp.getUserLabelByName(label);
if (!userLabel) {
return;
@valmayaki
valmayaki / googleScript.js
Created March 1, 2024 18:10 — forked from SciutoAlex/googleScript.js
Archive Gmail Regularly
// Code modified from: http://www.johneday.com/422/time-based-gmail-filters-with-google-apps-script
// This is code for a Google Apps Script. You can add the code and give it permissions at script.google.com
// Archive every thread in your Inbox that is older than two days, and not starred.
function archiveInbox() {
var threads = GmailApp.search('label:inbox older_than:2d -in:starred');
for (var i = 0; i < threads.length; i++) {
threads[i].moveToArchive();
}
@valmayaki
valmayaki / hammerspoon-move-resize.lua
Created July 23, 2022 16:59 — forked from kizzx2/hammerspoon-move-resize.lua
Hammerspoon script to move/resize window under cursor
-- Inspired by Linux alt-drag or Better Touch Tools move/resize functionality
function get_window_under_mouse()
-- Invoke `hs.application` because `hs.window.orderedWindows()` doesn't do it
-- and breaks itself
local _ = hs.application
local my_pos = hs.geometry.new(hs.mouse.getAbsolutePosition())
local my_screen = hs.mouse.getCurrentScreen()
@valmayaki
valmayaki / copyToFat32.sh
Created January 15, 2021 19:20 — forked from nabilfreeman/copyToFat32.sh
FAT32 File copier & splitter (works with Multiman)
#!/bin/bash
# Are you using Mac OS X?
# You need to install coreutils for this to work.
# try `brew install coreutils`
# or `sudo port install coreutils`
# set a part size that works with FAT32 drives
PART_SIZE=3999
# nice little intro
@valmayaki
valmayaki / gist:be6bea9b0e9658fecf999a2042c1648a
Created May 20, 2020 17:32 — forked from mauvm/gist:5de07085f3b51e117378
An "envsubst" alternative for replacing env variables in NGinX site configurations (for using it with Docker)
#!/bin/bash
# NOTE: Brackets are not supported and '$' in values will break the script.
mkdir /etc/nginx/sites-enabled 2> /dev/null
for file in /etc/nginx/sites-available/*.conf
do
TPL=$(cat $file)
for row in $(env)
do