Skip to content

Instantly share code, notes, and snippets.

View iammerrick's full-sized avatar

Merrick Christensen iammerrick

View GitHub Profile
#!/bin/bash
set -euo pipefail
if [[ $CI_BRANCH == mobile-web/* || $CI_BRANCH == "master" ]]; then
echo "Ahh, yes fresh code for some cookin'!";
npm run build
scripts/metrics
else echo "This build was skipped due to being an unrelated match."
fi
In working through the third exercise on page 89 I am having trouble completing the task…
let x = 7; y = negate x; z = y * 10 in z / x + y
So my first take looks something like this:
(\x -> (\y -> (\z -> z / x + y) (y * 10)) negate x) 7
But it won’t compile so I start to pair it back… I notice I get a different error here:
import { selectCurrentQuery } from 'searchSelectors';
export const search = (query) => {
return (dispatch, getState) => {
dispatch({
type: UPDATE_QUERY,
payload: { query }
});
const query = selectCurrentQuery(getState());

Redux Chaos Monkey

This is a proof of concept which allows you to replay system events in a random order each time to make sure your UI can tolerate variable states.

I'm not sure if this is worthy of its on open source project with additional features like changing play back time, whitelisting/blacklisting actions etc but figured I'd put this out there to see if it piques anyones interest.

See a video of this in action here: [https://www.youtube.com/watch?v=wkoukONfwmA](Video on YouTube).

Though my work may be menial, though my contribution may be small, I can perform it with dignity and offer it with unselfishness. My talents may not be great, but I can use them to bless the lives of others. I can be one who does his work with pride in that which comes from hand and mind. I can be one who works with respect for my associates, for their opinions, for their beliefs, with appreciation for their problems and with a desire to help them should they stumble. I believe in the principle that I can make a difference in this world. It may be ever so small. But it will count for the greater good. The goodness of the world in which we live is the accumulated goodness of many small and seemingly inconsequential acts. - Gordon B Hinkley

import { fn } from './service';
// GG Babel 6 Blows up
import expect from 'expect';
import AppConstants from '../../../app/AppConstants';
import store from '../../store';
import { selectLastReadMessageByChannelId } from './channelSelectors';
describe('channel', () => {
it('should store the messageId when clearing unreads', () => {
const channelId = 1;
const messageId = 2;
store.dispatch({
@iammerrick
iammerrick / Main.elm
Created December 11, 2015 02:59
This is bad elm code I wrote.
import StartApp.Simple as StartApp
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Signal exposing (Address)
import Json.Decode as Json
main =
StartApp.start { model = model, view = view, update = update }
@iammerrick
iammerrick / Component Extensibility.md
Last active December 11, 2015 18:08
Component Extensibility & Toggling Children

A lot of times I'll see developers author a component like this:

const Component = ({shouldShowSomething}) => {
  return (
    <div>
      <div>Some Elements</div>
      { shouldShowSomething ? <div>Something</div> : null }
    </div>
 );
@iammerrick
iammerrick / gist:e0f30c2c85183b97139e
Created September 21, 2015 21:40
Speed Up ESLint + Syntastic
SCRIPT /Users/Merrick/.vim/bundle/syntastic/plugin/syntastic/autoloclist.vim
Sourced 2 times
Total time: 0.000140
Self time: 0.000140
count total (s) self (s)
if exists('g:loaded_syntastic_notifier_autoloclist') || !exists('g:loaded_syntastic_plugin')
1 0.000001 finish
endif
1 0.000004 let g:loaded_syntastic_notifier_autoloclist = 1