Skip to content

Instantly share code, notes, and snippets.

View gmail-to-discord.js
// useful at script.google.com
// set these to discord webhooks.
const WEBHOOKS = {
SLAB: '',
ASANA: '',
FIGMA: '',
GREENHOUSE: ''
}
// these searches work great for me. The first does the search logic in
@joeybaker
joeybaker / open-in-vi.scrpt
Created Jun 14, 2018
Applescript to use in automator to open a file in Terminal in neovim
View open-in-vi.scrpt
on run {input}
set filename to POSIX path of input
set cmd to "clear;cd $(dirname " & filename & ");nvim " & quoted form of filename & "; exit"
tell application "System Events" to set terminalIsRunning to exists application process "Terminal"
tell application "Terminal"
activate
if terminalIsRunning is true then
set newWnd to do script with command cmd
else
do script with command cmd in window 1
View react-redux-links.md
View vim-styled-components-syntax-weirdness
// @flow
//
// This is a mininmal example, much of the real component is stripped out.
//
import React, { PureComponent } from 'react'
import { Image, Alert } from 'react-native'
import autobind from 'autobind-decorator'
import styled from 'styled-components/native'
import Form from '../../components/Form/Form.component'
@joeybaker
joeybaker / redux-bugsnag.js
Created Nov 11, 2016
Redux middleware for bugsnag
View redux-bugsnag.js
import requestAnimationFrame from 'fbjs/lib/requestAnimationFrame'
import {get, omit} from 'lodash'
// this is okay b/c we tell webpack to ignore the node version of bugsnag in
// package.json
// "browser": {"bugsnag": false}
import bugsnag from 'bugsnag'
const SEVERITIES = {ERROR: 'error', WARN: 'warning', INFO: 'info'}
const NODE_ENV = process.env.NODE_ENV
const IS_BROWSER = process.browser
View keybase.md

Keybase proof

I hereby claim:

  • I am joeybaker on github.
  • I am joeybaker (https://keybase.io/joeybaker) on keybase.
  • I have a public key whose fingerprint is E79A 8CB3 BD26 FAF2 DE85 050C D111 C7BF 1E35 AF45

To claim this, I am signing this object:

View npm-should-install.patch
From c39e95ae6d41939e73568bea5782228d8590b953 Mon Sep 17 00:00:00 2001
From: Joey Baker <joey@byjoeybaker.com>
Date: Thu, 31 Mar 2016 11:17:44 -0700
Subject: [PATCH] Add: bin/should-install
Small script that warns if the dependencies are different from the last
time the script was run.
---
bin/lib/should-install.js | 61 +++++++++++++++++++++++++++++++++++++++++++++++
bin/should-install | 22 +++++++++++++++++
View bulk_update_heroku_ssl_certs.sh
#!/bin/bash
# strict mode http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
IFS=$'\n\t'
function f () {
# set these to your server crt and key files
local crt=server.crt
local key=server.key
View gist:4d20303d56d8cb8a82af
"note6": "cirlce ci gives us the ability to run set-npm-token before npm i, heroku does not, so we have to detect the heroku env and manually run npm install because changing .npmrc from an npm hook isn't pick up until the next run of npm",
"set-npm-token": "if [ -n \"${NPM_TOKEN-}\" ]; then echo \"//registry.npmjs.org/:_authToken=$NPM_TOKEN\" >> .npmrc; fi",
"preinstall": "npm run set-npm-token && if [ -n \"${DEPLOY_ENV-}\" ]; then echo installing; npm install --unsafe-perm --userconfig .npmrc --ignore-scripts; fi",
"postinstall": "if [ -n \"${DEPLOY_ENV-}\" ]; then npm run build; fi"
View index.js
import setupCSS from './load-css-require.js'
setupCSS(__dirname, (err) => {
if (err) throw err
require('my-front-end-components-that-require-css-files.js')
})
You can’t perform that action at this time.