Skip to content

Instantly share code, notes, and snippets.

View rxgx's full-sized avatar

Ryan Gasparini rxgx

View GitHub Profile
@rxgx
rxgx / rename-to-jsx.js
Created July 31, 2019 21:02
Rename JS to JSX with ESLint JSON output
// Run eslint with the rule 'react/jsx-filename-extension' as 'error'
// eslint -o json > files.json
const fs = require('fs');
const json = require('./files.json')
console.log('run...', json.length);
json
.filter(entry => entry.messages.length)
const AWS = require('aws-sdk');
const client = new AWS.SecretsManager({});
// Call the AWS API and return a Promise
function getAwsSecret(secretName) {
return client.getSecretValue({ SecretId: secretName }).promise();
}
// Create a async function to use the Promise
@rxgx
rxgx / merge-filter-branch.md
Last active August 18, 2021 19:08 — forked from trongthanh/gist:2779392
How to move a folder from one repo to another and keep its commit history
@rxgx
rxgx / osx.md
Last active May 19, 2021 18:34
Mac OS Install Checklist

Here's what to do after completing a fresh install of Mac OS X.

General Config

  1. App Store

    • Run Software Update
    • Install software
  2. Keyboard

@rxgx
rxgx / deploy.md
Created April 29, 2020 21:02
Deployment strategies

How to incrementally introduce functionality to micro-service-based deployments:

  • add new thing to data source (if needed)
  • use new thing to backend
  • use new thing in client
  • remove old thing in client
  • remove old thing from backend (as all client nodes have upgraded)
  • remove old thing from database (if data source changed, as all backend nodes have upgraded)

How to incrementally introduce functionality to environment-based deployments:

@rxgx
rxgx / inputUserMappings.xml
Last active December 25, 2020 21:43
Cyberpunk 2077 Keys for Left Hand
<?xml version="1.0"?>
<bindings>
<!-- MAPPINGS -->
<mapping name="LeftX_Axis" type="Axis" >
<button id="IK_Pad_LeftAxisX" />
<button id="IK_A" val="-1.0" overridableUI="left"/>
<button id="IK_D" val="1.0" overridableUI="right"/>
</mapping>
<mapping name="LeftY_Axis" type="Axis" >
@rxgx
rxgx / BIO.md
Created December 16, 2020 22:03
My bio from website

Meet Ryan Gasparini. He's a Frontend Developer, Interface Designer, and Software Engineer from Portland, OR.

Mechanical execution, creative thinking

Early in life, Ryan Gasparini had a dream to design automobiles. As a child he made various drawings of cars and trucks on napkins, placemats, and notebooks. In high school, he elected to take classes in manual and computer-aided drafting. His passion and skill for drawing and drafting earned him many regional awards in Mechanical Drawing.

After graduation, he enrolled in university to pursue a degree in mechanical engineering. Unfortunately, not having any experience in the matter, he failed the shop and material classes. Surprisingly, though, when it came to computer programming, he was a natural. It was ultimately a C programming class that influenced him to change his career path.

Aside from drafting, Ryan spent many afternoons in the high school computer lab. He spent the majority of that time learning how to build a snowboarding page on Geocities. T

@rxgx
rxgx / server.js
Last active September 25, 2020 22:16
Express initial config
const cors = require('cors');
const express = require('express');
const corsConfig = {
optionsSuccessStatus: 200,
origin: ['http://localhost:3000', 'http://localhost:8000']
}
app = express();
@rxgx
rxgx / gist:b24b43fa8ec436e3d6e3
Last active June 9, 2020 23:34
Render a React Component with Angular Router

For coupling new ReactJS components with legacy angular routing/services.

  • Create a function that returns the angular route object. This object contains a controller that handles the mounting and unmounting of the React component, as well as a container template to render the component inside of. Note: the containerId is arbitrary and only exists to identify the container the component will be placed in.
var registerRouteForComponent = function (componentClass) {
    var containerId = 'reactComponentRender';

    var controller = function ($scope, $injector) {