Skip to content

Instantly share code, notes, and snippets.

View AlexKVal's full-sized avatar

Alex Shemetovskiy AlexKVal

View GitHub Profile
@AlexKVal
AlexKVal / LICENSE.txt
Last active August 29, 2015 14:20 — forked from jed/LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
it('should focus dropdown items when pressing cursor up and down keys', function () {
// Have to run this in actual DOM to verify focus
let testContainer = document.createElement('div');
document.body.appendChild(testContainer);
// Create instance as normal, only in DOM
instance = React.render(
<DropdownButton title="Title">
<MenuItem eventKey="1">MenuItem 1 content</MenuItem>
@AlexKVal
AlexKVal / pr.md
Last active August 29, 2015 14:18 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying