Skip to content

Instantly share code, notes, and snippets.

View resistdesign's full-sized avatar
💭
Exploring bypassed terrain.

Ryanne Graff resistdesign

💭
Exploring bypassed terrain.
View GitHub Profile
@resistdesign
resistdesign / ParamWithMeta.ts
Created June 9, 2021 05:17
AWS CDK Template Param Helper
export class ParamWithMeta extends CfnParameter {
constructor(
scope: Construct,
id: string,
props?: { label?: string; group?: string } & CfnParameterProps
) {
const { label = id, group = 'Parameters', ...paramProps } = props || {};
super(scope, id, paramProps);
@resistdesign
resistdesign / Best_Practice.txt
Created October 20, 2020 04:23
Best Practice
_ ___ ___ ___ ___ _ ___ _____
/_\ / __|/ __|_ _|_ _| /_\ | _ \_ _|
/ _ \\__ \ (__ | | | | / _ \| / | |
/_/_\_\___/\___|___|___|_/_/_\_\_|_\ |_|
|_ _/ __| /_\ | _ ) __/ __|_ _|
| |\__ \ / _ \ | _ \ _|\__ \ | |
|___|___/ /_/ \_\_|___/___|___/_|_|__ _
| _ \ _ \ /_\ / __|_ _|_ _/ __| __| |
| _/ / / _ \ (__ | | | | (__| _||_|
|_| |_|_\/_/ \_\___| |_| |___\___|___(_)
@resistdesign
resistdesign / DragDropItem.jsx
Created October 8, 2020 16:27
React Drag And Drop
import T from 'prop-types';
import React, {PureComponent} from 'react';
export default class DragDropItem extends PureComponent {
static propTypes = {
active: T.bool,
dataType: T.string,
data: T.string,
draggable: T.bool,
dropZone: T.bool,
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@resistdesign
resistdesign / gitgo
Last active October 8, 2020 13:50
Git Go!
#!/bin/bash
# See: https://www.conventionalcommits.org/en/v1.0.0
read -p 'Type: ' TYPE
read -p 'Subject: ' SUBJECT
read -p 'Message: ' MESSAGE
git add .
git commit -m "${TYPE}: (${SUBJECT}) ${MESSAGE}"
git push
@resistdesign
resistdesign / diff.json
Created December 13, 2019 01:50
Diff Json
[{"chunks":[{"content":"@@ -1,6 +1,6 @@","changes":[{"type":"normal","normal":true,"ln1":1,"ln2":1,"content":" {"},{"type":"normal","normal":true,"ln1":2,"ln2":2,"content":" \"name\": \"booklets-desktop\","},{"type":"del","del":true,"ln":3,"content":"- \"version\": \"1.1.0\","},{"type":"add","add":true,"ln":3,"content":"+ \"version\": \"1.1.1\","},{"type":"normal","normal":true,"ln1":4,"ln2":4,"content":" \"lockfileVersion\": 1,"},{"type":"normal","normal":true,"ln1":5,"ln2":5,"content":" \"requires\": true,"},{"type":"normal","normal":true,"ln1":6,"ln2":6,"content":" \"dependencies\": {"}],"oldStart":1,"oldLines":6,"newStart":1,"newLines":6}],"deletions":1,"additions":1,"from":"package-lock.json","to":"package-lock.json","index":["af5bc9f..0391f1e","100644"]},{"chunks":[{"content":"@@ -1,6 +1,6 @@","changes":[{"type":"normal","normal":true,"ln1":1,"ln2":1,"content":" {"},{"type":"normal","normal":true,"ln1":2,"ln2":2,"content":" \"name\": \"booklets-desktop\","},{"type":"del","del":true,"ln":3,"c
{
"expectUserResponse": true,
"expectedInputs": [
{
"possibleIntents": [
{
"intent": "actions.intent.MAIN"
}
],
"inputPrompt": {
@resistdesign
resistdesign / FramedContainer.jsx
Created July 16, 2018 13:27
Named Children (FramedContainer) HOC
import T from 'prop-types';
import React, {Children, PureComponent} from 'react';
function getChildMapPropObject(child = {}) {
const newProps = {};
const {type, props: {children: propValue} = {}} = child;
if (typeof type === 'string') {
newProps[type] = propValue;
}
{
options: {
x: {
field: 'time',
label: 'Time',
step: 1,
start: 0,
end: 100
},
y: {
@resistdesign
resistdesign / .gitignore
Last active July 17, 2017 19:00
Flatten Int Array
.idea/
node_modules/