Skip to content

Instantly share code, notes, and snippets.

View chadfurman's full-sized avatar

Chad Furman chadfurman

View GitHub Profile
@chadfurman
chadfurman / 4-2-notes.md
Last active April 3, 2017 05:37
4-2-notes.md

Filtering

  • .filter(callback) is like .map(callback)
  • Client side searching: array.filter( ${string_template}.toUpperCase().indexOf(this.state.searchTerm.toUpperCase()) >= 0 ) => map output what's left

Snapshot Testing w/ Jest

  • Library from Facebook
  • Migrating from Jasmine -- Jest2 uses Jasmine2 in the back-end
  • Jest2 is better than Jest1
@chadfurman
chadfurman / 3-27-meeting-notes.md
Last active March 27, 2017 12:21
3-27-meeting-notes
  • Good to know more about the high-level components like the Router
  • Good to know more about webpack config
  • dont use dangerouslySetHTML attribute :)
  • Key props? Why? -- if you have a key, it helps React konw what to re-render
  • PropTypes warnings are great, but not needed in production
  • One-way data-flow with events to change things vs Two-way data with magic
  • The teacher explains things very well
  • Learning about the HashRouter is interesting -- also is knowing when to use it
  • The built-in dev server has a fallbackApi route
  • preload with json puts all data in the same place
@chadfurman
chadfurman / meeting-3-21.markdown
Created March 20, 2017 12:15
FEM React v2 3/21 meeting
  • Nice to know how to config babel / webpack by hand
  • This empowers us to not rely on pre-generated config files here
  • We can also better change the file if we need to add something.
  • Loose-mode in babel is interesting, didn't know about this. It's a little dangerous, but interesting.
  • Webpack config is normally confusing, but it's actually easy once you know what it all means.
  • The route videos didn't work at one point
  • Ultimately it's interesting that there's different versions of react router, and the differences are important
@chadfurman
chadfurman / 3-21-notes.md
Last active March 27, 2017 04:36
Frontend Masters React v2 3/21, 3/27

Babel Configuration

  • .babelrc (required json file)
  • Presets and Plugins -- a preset is a group of plugins
  • es2015 preset is all the plugins needed to get from es6 to es5
  • presets: ["es2015", {"modules": false}] <-- config for es2015 to make it so babel doesn't process modules
    • we do this for treeshaking
    • es2015 has a "loose": true config option

Creating a Webpack config.js File

  • webpack --module-bind="js=babel' js/ClientApp.js (all JS files get loaded through babel)
@chadfurman
chadfurman / meeting-3.13.md
Created March 13, 2017 12:24
Complete Full-Stack React: 3/13 Meeting
  • Webpack is cool
  • Learning React from the ground-up is neat, no JSX or anything
  • createElement / createClass is something "new" since people are using JSX which is so much easier to read/code
  • comparing React to Angular was neat. React is so much easier to understand
  • Yarn is pretty interesting -- a few people haven't used it before.
  • npm takes so much longer! Speeding this up with yarn is great :)
  • Starting from the very beginning without all the libraries is very helpful
  • When all the libraries are there, it's easy to get lost in what is "react" and what isn't -- ES6? JSX? Redux? Etc.
  • Standard is great -- consistency is king. Semicolons aren't as big a deal when you have a "standard"
  • consistency really pays off, good house-keeping
@chadfurman
chadfurman / react-week1.md
Last active March 13, 2017 05:35
Full-Stack React Notes: 3/6-3/13

Intro

  • Brian Holt -- worked at Netflix, Reddit, wrote Reddit's first React code
  • btholt.github.io/complete-intro-to-react-v1
  • nho.lt/react

Yarn

  • Be above node 4 -- he's on 6+
  • nvm is a useful tool
  • What is yarn? yarn came out recently, it's new / shiny / fun, it replaces npm, it's by facebook
  • npm install --save react vs yarn add react
@chadfurman
chadfurman / start.sh
Created March 10, 2017 08:15
start script
screen -dmS web -t api node /vagrant/app.js
screen -S web -X screen -t media node /vagrant/media-server/server.js
screen -S web -X screen -t janus /opt/janus/bin/janus
screen -S web -X screen -t bash
screen -r
  • Diego: Dicomm, React is getting bigger, good to leran, used in current project.
  • Henrique: Dicomm, React is used in current project so this course just makes sense.
  • Ian: Domino, using React, wants to get proficient in a framework. The ES6 course looks good also, as well as the Webpack
  • John: Online advertising for digital TV, used React on a few projects already. Took other courses at CT including Teambuilding, and looking at ES6.
  • Vitor: Needs credentials, Dicomm, experienced in Node.JS, wants to get back to the front-end and so that's why React. Very interested in ES6 course.

Meeting notes to be posted in channel after every meeting, along with a link to the topic for the next week

For the topic notes that you take, please take them as a gist.github.com entry in whtaever format you want and post a link to the channel like so:

@chadfurman
chadfurman / ffmpeg.sh
Created February 28, 2017 05:45
ffmpeg
ffmpeg -ac 1 -c:a libopus -b:a 32k /tmp/media-server/recordings/180/combined-audio-b948571cea64cce1465f14d28582da4b.opus -i /tmp/media-server/recordings/180/videoroom-180-user-2-1488211363094960-audio.opus -i /tmp/media-server/recordings/180/videoroom-180-user-2-1488211363094960-video.opus -i /tmp/media-server/recordings/180/videoroom-180-user-17-1488211363095242-audio.opus -i /tmp/media-server/recordings/180/videoroom-180-user-17-1488211363095242-video.opus -i /tmp/media-server/recordings/180/videoroom-180-user-11-1488211363095302-audio.opus -i /tmp/media-server/recordings/180/videoroom-180-user-11-1488211363095302-video.opus -i /tmp/media-server/recordings/180/videoroom-180-user-2-1488211684097111-video.opus -i /tmp/media-server/recordings/180/videoroom-180-user-2-1488211684097111-audio.opus -filter_complex "[0:a]adelay=1|1[d0];[1:a]adelay=1|1[d1];[2:a]adelay=1|1[d2];[3:a]adelay=1|1[d3];[4:a]adelay=1|1[d4];[5:a]adelay=1|1[d5];[6:a]adelay=321002|321002[d6];[7:a]adelay=321002|321002[d7];[d0][d1][d2][d3][d4][d
@chadfurman
chadfurman / Exercises.md
Last active February 20, 2017 08:58
Exercises