Skip to content

Instantly share code, notes, and snippets.

@fokusferit
fokusferit / enzyme_render_diffs.md
Last active April 15, 2024 09:41
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@tonymorris
tonymorris / ysu.txt
Created April 20, 2017 01:49
YSU computer science has a reputation for anti-intellectualism
[06:45:34] <relrod> Do not ask me to rant about CS education. https://images.srv1.elrod.me/do-not-ask-me-to-rant-about-cs-education.png
[06:45:39] <relrod> bad idea for everyone
[06:45:40] <relrod> :slightly_smiling_face:
[12:30:07] *** Joins: caraballo114 (caraballo114@irc.tinyspeck.com)
[12:53:11] <djday01> CS education in general or at YSU?
[13:08:24] <tonymorris> they still teaching you the object oriented woowoo magix?
[22:16:27] <mrdegenova> I mean, they teach it, but they don't claim its magic, just another tool in the toolbox and one that is widely used in the world.
[22:17:46] <mrdegenova> @relrod This one was made with you in mind :joy: https://imgs.xkcd.com/comics/team_chat.png
[22:36:05] <tonymorris> haha, I used to lecture OO nonsense 15 years ago. http://blog.higher-order.com/blog/2008/12/04/no-such-thing/
[23:22:53] <mrdegenova> Just because there is no strict definition of OO, doesn't mean that its style isn't used. It is indeed widely used, and YSU focuses on "teaching for the job/real world"
@staltz
staltz / introrx.md
Last active April 20, 2024 14:15
The introduction to Reactive Programming you've been missing
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@twosixcode
twosixcode / gist:1988097
Created March 6, 2012 18:40
Make "Paste and Indent" the default paste in Sublime Text 2
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }