Skip to content

Instantly share code, notes, and snippets.


Jimmy Reichley J-Swift

  • Rockledge, FL
View GitHub Profile
J-Swift / git-rm-merged.ps1
Created Aug 19, 2020
Delete merged git feature branches in powershell
View git-rm-merged.ps1
git branch --merged | Select-String -Pattern 'feature' | %{ git branch -d $_.Line.Trim() }
J-Swift / .editorconfig
Last active Aug 10, 2020
C# monorepo style example
View .editorconfig
# NOTE(jpr): adapted from
root = true
#### Core EditorConfig Options ####
indent_size = 4
indent_style = space
trim_trailing_whitespace = true
J-Swift / BindableProperty.snippet
Created May 14, 2020
Xamarin.Forms BindableProperty Property
View BindableProperty.snippet
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="">
<CodeSnippet Format="1.0.0">
<Title>Bindable Property</Title>
<Author>Jimmy Reichley</Author>
<Description>Inserts boilerplate for BindableProperty property</Description>
J-Swift / add_chase_credit_card_reward.js
Last active Feb 14, 2021
Programmatically add all available chase credit card rewards
View add_chase_credit_card_reward.js
await (async function wrapper() {
const accountDropdownSelector = 'mds-select mds-select-option';
const addDealSelector = '.sixersoffers__cta .iconAddToCard';
const closeFlyoutSelector = 'flyoutClose';
const delay = 1000;
const pause = async() => {
return new Promise(resolve => {
setTimeout(() => {
J-Swift /
Created Apr 14, 2020
Run tests for current golang project within a container to work around various OSX/nix env issues
docker run -it --rm -v $(PWD):/app golang:alpine /bin/sh -c "cd /app; CGO_ENABLED=0 go test ./..."
J-Swift / index.js
Last active Mar 14, 2020
Puppeteer - get recent BBT transactions
View index.js
const chromium = require('chrome-aws-lambda');
const chalk = require('chalk');
const USERNAME = process.env.USERNAME;
const PASSWORD = process.env.PASSWORD;
const DEFAULT_TIMEOUT = 5000;
const hl_info = chalk.bold.white;
const info = chalk.gray;
const positive =;
J-Swift /
Last active Dec 24, 2019
Detect what retropie rom directories dont have all their metadata
#!/usr/bin/env bash
readonly target_dir="${1:-}"
if [ -z "${target_dir}" ] || ! [ -d "${target_dir}" ]; then
echo "ERROR: doesnt exist or isnt a directory [${target_dir}]"
exit 1
readonly RED=$( tput setaf 1 )
J-Swift /
Last active Nov 22, 2019
Convenience script to intelligently connect to a kubernetes pod/node given the API name
#!/usr/bin/env bash
set -eu
readonly mode="${1:-}"
readonly target="${2:-}"
readonly ssh_key_path="path_to_kops_ssh_key"
die() {
J-Swift / TokenAuthInterceptor.ts
Created Sep 26, 2019
ngUpgrade compatible Angular2 shim for ng-token-auth
View TokenAuthInterceptor.ts
import { Injectable, Inject } from '@angular/core';
import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
import { Observable } from 'rxjs';
import { INgTokenAuthService } from './ng-token-auth';
export class TokenAuthInterceptor implements HttpInterceptor {
J-Swift / __etc__nginx__nginx.conf
Last active Sep 6, 2019
Basic nginx conf for multiple static sites on single host
View __etc__nginx__nginx.conf
# nginx Configuration File
# Run as a less privileged user for security reasons.
user www-data www-users;
# How many worker threads to run;
# "auto" sets it to the number of CPU cores available in the system, and
# offers the best performance. Don't set it higher than the number of CPU
# cores if changing this parameter.