Skip to content

Instantly share code, notes, and snippets.

View phyllisstein's full-sized avatar

Daniel P. Shannon phyllisstein

View GitHub Profile
@phyllisstein
phyllisstein / components.jsx
Last active July 12, 2022 15:03
Two patterns for sharing MapStack UI.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ⭑ Approach Two ⭑ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// ~~~~~~~~~~~~~~~~~~~~~ Component Components Component ~~~~~~~~~~~~~~~~~~~~~ //
/**
* Our package exposes a number of React components purpose-dedicated to
* building a map; the downstream app composes the React components we expose.
* The Unison component, not our code, would call ReactDOM::render. This is the
* pattern one normally sees with React libraries.
*/
import { MapsStack, Map, Pin } from '@voxmedia/maps-ui'
require 'active_support/all'
map_recircs = {}
map_venues = {}
average_recirc = 0
MapStack.all.each do |map|
next unless map.map_cards.present?
title = map.title.parameterize(separator: '_').to_sym
import { babel, css } from '@nymag/configs/webpack/loaders/index.js'
import {
client,
development as developmentEnvironment,
} from '@nymag/configs/webpack/environments/index.js'
import {
context,
entrypoints,
resolveExtensions,
resolveModules,
@phyllisstein
phyllisstein / .dockerignore
Last active August 15, 2022 14:02
Dockerize Node app without installing or linking node_modules.
**/node_modules/**
**/.git/**
**/dist/**
[64290:1024/082914.178063:INFO:CONSOLE(83)] "Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' https://*.vscode-cdn.net 'nonce-icgVV3j6VgF5uX05ewOoIA==' 'unsafe-hashes' 'sha256-zCS+ubUbQ2s89oA2fBkOFRlQUjbq1DjjsiGY9OlmDMk=' 'sha256-0oUKC05+rMUna2WV/1dh4gYJXRAMAEtVgf+n8LpKnfE='". Either the 'unsafe-inline' keyword, a hash ('sha256-TMLnGHcHuaP1IGfOIlow4y9VuEmkzaBSGhTQHF7CzWM='), or a nonce ('nonce-...') is required to enable inline execution.
", source: https://file+.vscode-resource.vscode-cdn.net/tmp/code-git-lens-extensions/eamodio.gitlens-13.0.3/dist/webviews/settings.js (83)
{
"slug": "punk-hardcore-photos-sunday-matinee",
"byline": [
{
"names": [
{
"twitter": "",
"facebook": "",
"name": "Caryn Rose",
"instagram": "",
@phyllisstein
phyllisstein / fontawesome.sty
Last active July 17, 2023 14:03
FontAwesome 5.0.0-beta.6 mapping for XeLaTeX
% FontAwesome Pro 5.0.0-beta.6 (https://github.com/FortAwesome/Font-Awesome-Pro)
% bindings for XeLaTeX.
%
% Author: Honza Ustohal <honza@egoistic.biz>
% (https://gist.github.com/sway/3101743)
%
% Updated for FontAwesome 5 by Daniel P. Shannon <daniel@daniel.sh>.
%
% Translation of FontAwesome's private range characters into XeTeX symbols. All
% icons are camel-cased and prefixed with 'fa', i.e. what was .fa-address-book