Skip to content

Instantly share code, notes, and snippets.

View danReynolds's full-sized avatar
💭
Grinding

Dan Reynolds danReynolds

💭
Grinding
View GitHub Profile
### Keybase proof
I hereby claim:
* I am danReynolds on github.
* I am dan_reynolds (https://keybase.io/dan_reynolds) on keybase.
* I have a public key whose fingerprint is 85B5 52A0 B728 47A3 DAF1 720B 7E54 566C 428A B6E6
To claim this, I am signing this object:
@danReynolds
danReynolds / gist:edf55e8427973b01dd51
Last active August 29, 2015 14:09
Setting Up Our Music Server
Music server live install:
-1) didn't have microSD to SD card, put micro in Z10 to flash image
0) flashed openelec/geekbox, didn't do enough of what we wanted
1) debianjesse took too long to download
2) debian wheezy we abandoned
3) arch worked well, then it didn't
4) broke sd card
5) Blackberry wouldnt format it
6) formatted with Galaxy S2
7) Tried to Download Ubuntu 14.04 on my linux desktop, not 5G and is taking too long
:bowtie: :smile: :laughing: :blush: :smiley: :relaxed: :smirk: :heart_eyes: :kissing_heart: :kissing_closed_eyes: :flushed: :relieved: :satisfied: :grin: :wink: :stuck_out_tongue_winking_eye: :stuck_out_tongue_closed_eyes: :grinning: :kissing: :kissing_smiling_eyes: :stuck_out_tongue: :sleeping: :worried: :frowning: :anguished: :open_mouth: :grimacing: :confused: :hushed: :expressionless: :unamused: :sweat_smile: :sweat: :disappointed_relieved: :weary: :pensive: :disappointed: :confounded: :fearful: :cold_sweat: :persevere: :cry: :sob: :joy: :astonished: :scream: :neckbeard: :tired_face: :angry: :rage: :triumph: :sleepy: :yum: :mask: :sunglasses: :dizzy_face: :imp: :smiling_imp: :neutral_face: :no_mouth: :innocent: :alien: :yellow_heart: :blue_heart: :purple_heart: :heart: :green_heart: :broken_heart: :heartbeat: :heartpulse: :two_hearts: :revolving_hearts: :cupid: :sparkling_heart: :sparkles: :star: :star2: :dizzy: :boom: :collision: :anger: :exclamation: :question: :grey_exclamation: :grey_question: :zzz: :
We couldn’t find that file to show.
@danReynolds
danReynolds / tmux.md
Last active September 23, 2016 16:49
Tmux Wonder Sheet

Shortcuts

  • Move pane left: ctrl+b {
  • Move pane right: ctrl+b }
  • Toggle pane full screen: ctrl+b z
  • Kill session: ctrl+b :kill-session
  • new window: ctrl+b c
  • switch windows: ctrl+b number
  • synchronize panes: ctrl+b :setw synchronize-panes
  • kill current pane: ctrl+b x
@danReynolds
danReynolds / emoji
Created October 2, 2014 15:21
A List of every Github emoji in pasteable format
:bowtie: :smile: :laughing: :blush: :smiley: :relaxed: :smirk: :heart_eyes: :kissing_heart: :kissing_closed_eyes: :flushed: :relieved: :satisfied: :grin: :wink: :stuck_out_tongue_winking_eye: :stuck_out_tongue_closed_eyes: :grinning: :kissing: :kissing_smiling_eyes: :stuck_out_tongue: :sleeping: :worried: :frowning: :anguished: :open_mouth: :grimacing: :confused: :hushed: :expressionless: :unamused: :sweat_smile: :sweat: :disappointed_relieved: :weary: :pensive: :disappointed: :confounded: :fearful: :cold_sweat: :persevere: :cry: :sob: :joy: :astonished: :scream: :neckbeard: :tired_face: :angry: :rage: :triumph: :sleepy: :yum: :mask: :sunglasses: :dizzy_face: :imp: :smiling_imp: :neutral_face: :no_mouth: :innocent: :alien: :yellow_heart: :blue_heart: :purple_heart: :heart: :green_heart: :broken_heart: :heartbeat: :heartpulse: :two_hearts: :revolving_hearts: :cupid: :sparkling_heart: :sparkles: :star: :star2: :dizzy: :boom: :collision: :anger: :exclamation: :question: :grey_exclamation: :grey_question: :zzz: :
# Moving from Ava to Jest
---
## Pros and Cons
Benefits:
- Locally it has sped up tests from about 40-50 seconds for Ava, to 8-10 for jest
- On Travis it has cut test runs down about 9-10 minutes
@danReynolds
danReynolds / gist:116d85bc25c4bfcd1fc8
Last active January 2, 2020 19:10
Setting up a server for music

#Steps to Getting on House/Work Music:

  1. Download here (we use Ubuntu)
  2. Install a front end like these
  3. Run mopidy in the terminal to start with the default config and view it with the mopidy config command.
  4. Set up your local files to add to mopidy by specifying the media/local_dir in /home/name/.config/mopidy/mopidy.conf
  5. Scan your media library in the directory you've specified with the mopidy local scan command.
  6. Now start mopidy again and play your music using one of the frontends.
  7. To make this available to friends, install ngrok
  8. signup to get a custom subdomain and then run using ngrok -subdomain yoursubdomain 6680 where 6680 is mopidy's default port.
# Types for Query Hooks:
Custom TS typings for GraphQL queries in `.graphql` files:
https://github.com/Shopify/graphql-tools-web/tree/master/packages/graphql-typescript-definitions
Benefit is that you get more robust typing of query usages, as well as automatic type inferencing vs explicit specification for `useQuery`, `useMutation` using their hooks extensions: https://github.com/Shopify/quilt/tree/master/packages/react-graphql. Adds some additional hooks like `createAsyncQuery` for a lazy-loaded query document.
Chose to use `.graphql` files not co-located with components.
# Dynamic fixtures
## First update to a Component with useQuery
1. useBaseQuery
useBaseQuery is a React hook that sets up a QueryData object from which data is delivered from a query to the component. On first render, it memoizes
the options for the query, variables etc then calls execute on its internal QueryData object to start the process.
2. QueryData
`execute` receives the query parameters, variables etc from the useBaseQuery hook, and if not set up, sets up a watchQuery for the given query arguments in `initializeObservableQuery`.