Skip to content

Instantly share code, notes, and snippets.

View joeyfigaro's full-sized avatar
🦀
Becoming a Rustacean

Jay Figaro joeyfigaro

🦀
Becoming a Rustacean
View GitHub Profile
@joeyfigaro
joeyfigaro / find-with-filtering.md
Created April 6, 2021 14:19
['find' with path filtering] Find target files while ecluding a set of specified directories #osx #find #monorepos #commandline
find / -name MyFile ! -path '*/Directory/*'

Example

Find all package.json files in monorepo packages (excluding node_modules/* and specific package location)

find . -name 'package.json' ! -path '*/node_modules/*' ! -path '*/prisma/generated/*'
@joeyfigaro
joeyfigaro / useInviteContacts.ts
Last active December 14, 2020 19:45
useInviteContacts
import React from 'react'
import { Contact } from 'react-native-contacts'
import { difference, without } from 'rambda'
type RoleStateKey = 'administrator' | 'guest' | 'contributor'
export type UseInviteContacts = {
toggleRecipient: (c: Contact) => void
toggleAdministrator: (c: Contact) => void
toggleContributor: (c: Contact) => void
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>Valid Polygon.kml</name>
<Style id="s_ylw-pushpin">
<IconStyle>
<scale>1.1</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
@joeyfigaro
joeyfigaro / SketchSystems.spec
Last active June 7, 2019 18:07
# Flight-Planning (KML Imports without S3 Uploading/Persisted KML)
# Flight-Planning (KML Imports without S3 Uploading/Persisted KML)
Flight Planning*
# User dropped / imported KML file
Empty*
drop KML file -> KML Added
import KML file manually -> KML Added
KML Added
# Begins as soon as a user drops/attaches a KML file
Create Readable File
@joeyfigaro
joeyfigaro / SketchSystems.spec
Last active June 7, 2019 15:48
# Flight-Planning (KML Imports)
# Flight-Planning (KML Imports)
Flight Planning*
# User dropped / attached KML file via advanced settings
Empty*
add KML file -> KML Added
KML Added
remove KML file -> Empty
# Begins as soon as a user drops/attaches a KML file
Create Readable File
@joeyfigaro
joeyfigaro / _colors.scss
Created December 15, 2017 21:15
Personal approach for supporting multiple themes and organizing required colors
$shared: (
yellow: #fec52e,
purple: #ca4392,
blue: #2259e4,
sky_blue: #22ade1,
green: #1bdddb
);
$themes: (
dark: map-merge(
@joeyfigaro
joeyfigaro / devtools.js
Last active June 16, 2017 14:33
Real World Ramda: Readable Redux Stores (devtools.js)
// client/store/devtools.js
import { curry, is, ifElse, allPass, isNil, not, identity } from 'ramda';
import { compose } from 'redux';
import { Iterable } from 'immutable';
const windowExists = is(Object, window);
const extensionCompose = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
const extensionComposeExists = not(isNil(extensionCompose));
const isImmutable = curry(Iterable.isIterable);
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@joeyfigaro
joeyfigaro / ramda-composition.js
Last active June 16, 2017 01:29
Ramda Composition Example
const props = ['users', 'lessons', 'favorites', 'history'];
const selectProps = pick(props);
const stringify = compose(
JSON.stringify,
selectProps
);
stringify({
sensitive: {