Skip to content

Instantly share code, notes, and snippets.

View ourmaninamsterdam's full-sized avatar

Justin Perry ourmaninamsterdam

View GitHub Profile
@ourmaninamsterdam
ourmaninamsterdam / hoc-testing.jsx
Created March 14, 2018 15:38
Testing inner component of HOC using Enzyme
const DummyComponent = () => <div>Dummy</div>;
const Component = getComposedComponent(DummyComponent);
const component = mount(
shallow(<Component foo={true} />).get(0)
);
eventMap.resize();
expect(component.state().fooBar).toBe(true);
@ourmaninamsterdam
ourmaninamsterdam / gist:9ddf1dc1d8c89aa5ee5924e377fb8cf8
Created January 25, 2018 15:53
WIP spawn supervisor with glob ignore
const globby = require("globby");
const { spawn } = require("child_process");
const pattern = [
"node_modules/**/!(*.*)",
"!node_modules/**/node_modules/",
"!node_modules/wwfeatures-common/node_modules/"
];
function startSpawn(ignore) {
@ourmaninamsterdam
ourmaninamsterdam / map-cmdline.lg
Last active April 6, 2017 08:18
A nicer hg log
changeset = '\033[0;31m{rev}:{phase}: \033{node|short} \033[0;34m{author|person}\033[0m {desc|firstline|strip} \033[0;32m({date|age}){branches}{bookmarks}{tags}'
changeset_verbose = '\033[0;31m{rev}:{node|short}:{phase} \033[0;34m{author|person}\033[0m {desc|firstline|strip} \033[0;32m({date|age}) {branches}{bookmarks}{tags}'
start_branches = ' '
branch = '\033[0;31m{branch}\033[0m'
start_bookmarks = ' '
bookmark = '\033[0;31m[{bookmark}]\033[0m '
last_bookmark = '\033[0;31m[{bookmark}]\033[0m'
bz2
Emmet Css Snippets
JSHint
MacTerminal
PyV8
SublimeLinter
tern_for_sublime
Default (OSX).sublime-keymap
Distraction Free.sublime-settings
[
{ "keys": ["super+shift+r"], "command": "reveal_in_side_bar"}
]
@ourmaninamsterdam
ourmaninamsterdam / .hgrc
Last active September 26, 2017 14:29
My Mercurial setup
# example user config (see "hg help config" for more info)
[ui]
# name and email, e.g.
username =
#username =
merge = diffmerge
editor = /usr/bin/vim
[extensions]
# uncomment these lines to enable some popular extensions
@ourmaninamsterdam
ourmaninamsterdam / Default.sublime-theme
Last active March 4, 2016 12:00
Sublime Text 3 Monokai Sidebar theme
[
{
"class": "sidebar_container",
"layer0.tint": [60, 60, 60],
"layer0.opacity": 1.0,
"layer0.draw_center": false,
"layer0.inner_margin": [0, 0, 1, 0],
"content_margin": [0, 0, 1, 0]
},
{
@ourmaninamsterdam
ourmaninamsterdam / Preferences.sublime-settings
Last active March 30, 2016 11:13
SublimeText 3 User Settings
{
"auto_close_tags": false,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme",
"dictionary": "Packages/Language - English/en_GB.dic",
"enable_telemetry": false,
"file_exclude_patterns":
[
"*.scssc",
@ourmaninamsterdam
ourmaninamsterdam / README.md
Last active February 15, 2016 11:28
Installing legacy versions of npm

#Installing legacy versions of npm

sudo npm install -g [email protected]

Note: If you run without sudo then npm will start uninstalling itself and then exit as it doesn't have su permissions. If you then try to do npm install, it is longer available.

@ourmaninamsterdam
ourmaninamsterdam / questions.md
Last active February 4, 2017 06:16
Questions