Skip to content

Instantly share code, notes, and snippets.


Joe Duncko JoeDuncko

View GitHub Profile
fokusferit /
Last active Jun 10, 2021
Difference between Shallow, Mount and render of Enzyme


Real unit test (isolation, no children render)

Simple shallow


  • constructor
  • render
tonymorris / ysu.txt
Created Apr 20, 2017
YSU computer science has a reputation for anti-intellectualism
View ysu.txt
[06:45:34] <relrod> Do not ask me to rant about CS education.
[06:45:39] <relrod> bad idea for everyone
[06:45:40] <relrod> :slightly_smiling_face:
[12:30:07] *** Joins: caraballo114 (
[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:
[22:36:05] <tonymorris> haha, I used to lecture OO nonsense 15 years ago.
[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 /
Last active Jun 20, 2021
The introduction to Reactive Programming you've been missing
DanHerbert /
Last active Jun 19, 2021
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

READ THIS Very Important Update

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 / uri.js
Created Apr 20, 2012
URI Parsing with Javascript
View uri.js
var parser = document.createElement('a');
parser.href = "";
parser.protocol; // => "http:"
parser.hostname; // => ""
parser.port; // => "3000"
parser.pathname; // => "/pathname/"; // => "?search=test"
parser.hash; // => "#hash"; // => ""
twosixcode / gist:1988097
Created Mar 6, 2012
Make "Paste and Indent" the default paste in Sublime Text 2
View gist:1988097
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }