Skip to content

Instantly share code, notes, and snippets.

View roger-mo-gusto's full-sized avatar

Roger Mo roger-mo-gusto

View GitHub Profile
(function () {
const ELEMENT_NODE = 1;
const TEXT_NODE = 3;
// https://stackoverflow.com/a/34559316
function walkText(node) {
if (node.nodeType == TEXT_NODE) {
node.data = node.data.replace(/(?<=[ \t]|(?:^|\"|\-|\=|(?:[.!?]\s)))(Sean|sean)(?=([ \t]|\.|\'||\-|\=|\"|\?|\/|\,))/g, "Shane");
} else if (node.nodeType == ELEMENT_NODE && node.nodeName != "SCRIPT") {
for (var i = 0; i < node.childNodes.length; i++) {
@roger-mo-gusto
roger-mo-gusto / PR Template
Last active May 8, 2020 17:30
PR Template
Accessible through GitHub Settings > Saved Replies or
https://github.com/settings/replies
You can trigger it on the PR page with `ctrl + .`, `ctrl + 1` (or 2, 3, n depending on how many saved replies you have)
Template:
[Jira Ticket](https://jira.gustocorp.com/browse/SAVE-)
**What changed**
@roger-mo-gusto
roger-mo-gusto / Git add, reset, checkout shortcuts
Last active April 19, 2020 18:28
Git Add, Reset, and Checkout Shortcuts
Sample usage:
###################### ADD ######################
~/workspace/zenpayroll development ⚡ add
Which files would you like to add?
[0]: engines/banking_bridge/app/graphql/banking_bridge/objects/savings.rb
[1]: engines/consumer_banking/app/services/consumer_banking/core_pro_service/transaction.rb
[2]: frontend/javascripts/components/cash_reserve/routers/cash_reserve_withdraw_router.jsx
@roger-mo-gusto
roger-mo-gusto / Run Specs
Last active May 14, 2020 19:13
Copies spec file prepended with yarn test or bundle exec rspec
#!/usr/bin/env bash
RED='\e[31m'
GREEN='\e[32m'
CYAN='\e[36m'
BLUE='\e[34m'
LIGHTBLUE="\e[94m"
PURPLE='\e[1;35m'
NC='\e[0m'
(function () {
const ELEMENT_NODE = 1;
const TEXT_NODE = 3;
// https://stackoverflow.com/a/34559316
function walkText(node) {
if (node.nodeType == TEXT_NODE) {
node.data = node.data.replace(/(?<=[ \t]|(?:^|\"|\-|\=|(?:[.!?]\s)))(Sean|sean)(?=([ \t]|\.|\'||\-|\=|\"|\?|\/|\,))/g, "Shane");
} else if (node.nodeType == ELEMENT_NODE && node.nodeName != "SCRIPT") {
for (var i = 0; i < node.childNodes.length; i++) {