Skip to content

Instantly share code, notes, and snippets.

Avatar
😂
https://lol.rogeruiz.com

Roger Steve Ruiz rogeruiz

😂
https://lol.rogeruiz.com
View GitHub Profile
@rogeruiz
rogeruiz / dms_nonmasteruser.sql
Last active Oct 7, 2022
AWS DMS NonMasterUser documentation revisted
View dms_nonmasteruser.sql
-- ███████╗██████╗ ██████╗ ███╗ ███╗ ████████╗██╗ ██╗███████╗
-- ██╔════╝██╔══██╗██╔═══██╗████╗ ████║ ╚══██╔══╝██║ ██║██╔════╝
-- █████╗ ██████╔╝██║ ██║██╔████╔██║ ██║ ███████║█████╗
-- ██╔══╝ ██╔══██╗██║ ██║██║╚██╔╝██║ ██║ ██╔══██║██╔══╝
-- ██║ ██║ ██║╚██████╔╝██║ ╚═╝ ██║ ██║ ██║ ██║███████╗
-- ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝
--
-- ██████╗ ███████╗███████╗██╗ ██████╗██╗ █████╗ ██╗ █████╗ ██╗ ██╗███████╗
-- ██╔═══██╗██╔════╝██╔════╝██║██╔════╝██║██╔══██╗██║ ██╔══██╗██║ ██║██╔════╝
-- ██║ ██║█████╗ █████╗ ██║██║ ██║███████║██║ ███████║██║ █╗ ██║███████╗
@rogeruiz
rogeruiz / log.txt
Created Sep 7, 2022
running a Nix update on Intel Mac with BitDefender enabled
View log.txt
replacing old 'mymove-packages'
installing 'mymove-packages'
these derivations will be built:
/nix/store/caqw0jcbw909zkx3j5lqwwa4ssnsdvrx-mymove-packages.drv
these paths will be fetched (37.58 MiB download, 169.98 MiB unpacked):
/nix/store/0xk767wa16miwacy3yq2jh10qb4f06x3-curl-7.84.0
/nix/store/1d11rh5gv8r7940f17m6fgybxpr9n73j-bzip2-1.0.6.0.2
/nix/store/1m3xkxfri4lwlnkhgkxgl2flcvf3s669-python3.10-platformdirs-2.5.2
/nix/store/337wr623s6x4vkizbkaljiq9iqws11jn-zlib-1.2.12
/nix/store/3gngv4wgnj0hvidfz1cfahzh2c3qn6yi-sqlite-3.39.0
View Troubleshooting.md

Troubleshooting

Intro

The incident management steps I have in mind when being on-call and getting an alert are:

  • Verify the issue
  • Triage
  • Communicate and scalate if needed
  • Mitigate
@rogeruiz
rogeruiz / .envrc.local-for_milmove
Last active Aug 26, 2022
My super simple MilMove local .envrc
View .envrc.local-for_milmove
# It takes me a little longer to open 1Pass to get my MFA number.
export DIRENV_WARN_TIMEOUT="90s"
# Create a DB_URL that I can consume in scripts and things
export DB_URL="postgres://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}"
@rogeruiz
rogeruiz / examples.md
Created Jun 8, 2022 — forked from ef4/examples.md
Webpack 5 Node Polyfills Upgrade Cheatsheet
View examples.md

Webpack 5 Node Polyfills Upgrade Cheatsheet

Webpack 4 automatically polyfilled many Node APIs in the browser. This was not a great system, because it could lead to surprisingly giant libraries getting pulled into your app by accident, and it gave you no control over the exact versions of the polyfills you were using.

So Webpack 5 removed this functionality. That means you need to make changes if you were relying on those polyfills. This is a quick reference for how to replace the most common patterns.

List of polyfill packages that were used in webpack 4

For each automatically-polyfilled node package name on the left, this shows the name of the NPM package that was used to polyfill it on the right. Under webpack 5 you can manually install these packages and use them via resolve.fallback.

View mirror.sh
#!/bin/sh
set -eufo pipefail
if [ "$#" -ne 2 ]; then
echo "usage: $0 source_repo_url target_repo_url" >&2
exit 1
fi
SOURCE_URL="$1"
@rogeruiz
rogeruiz / launch.json
Created Mar 10, 2022
Launch test functions in MilMove using F5 key
View launch.json
{
"configurations": [
{
"name": "Launch test function in MilMove using F5 key",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${relativeFileDirname}",
"args": [
"-test.v"
@rogeruiz
rogeruiz / get_title_and_url.applescript
Created Feb 7, 2022 — forked from vitorgalvao/get_title_and_url.applescript
AppleScript and JavaScript for Automation to get frontmost tab’s url and title of various browsers.
View get_title_and_url.applescript
-- AppleScript --
-- This example is meant as a simple starting point to show how to get the information in the simplest available way.
-- Keep in mind that when asking for a `return` after another, only the first one will be output.
-- This method is as good as its JXA counterpart.
-- Chromium variants include "Google Chrome", "Chromium", "Opera", "Vivaldi", "Brave Browser", "Microsoft Edge".
-- Specific editions are valid, including "Google Chrome Canary", "Microsoft Edge Dev".
-- "Google Chrome" Example:
tell application "Google Chrome" to return title of active tab of front window
@rogeruiz
rogeruiz / redirects-example.diff
Created Oct 21, 2021
Helpful for doing redirects on pages that we drastically changed for MilMove Docusaurus
View redirects-example.diff
M docs/backend/guides/_category_.json
@@ -1,5 +1,5 @@
{
"label": "Guides",
"position": 3,
- "collapsed": true
+ "collapsed": false
}
M docusaurus.config.js
@@ -167,5 +167,20 @@ module.exports = {