Skip to content

Instantly share code, notes, and snippets.

View jkup's full-sized avatar

Jon Kuperman jkup

View GitHub Profile
@jkup
jkup / index.jsx
Created December 15, 2015 23:47
React Question
<div className={(condition) ? 'grid-item Rejection Rejection--width2' : 'grid-item Rejection'}>
// How can I do this without repeating the grid-item and Rejection classes?
// Something like:
//<div className={"grid-item Rejection" if (condition) { "Rejection--width2" }}>
@jkup
jkup / index.js
Last active October 5, 2015 01:11
JavaScript multiline string regex
var string = "www.one \
www.two \
www.three";
var pattern = /^(www\.)\w+/gm;
console.log(string.match(pattern));
@jkup
jkup / index.js
Created April 24, 2015 18:02
Why would you do this?
(function() {
var foo = new $.Deferred();
function bar() {
doSomething();
foo.resolve();
}
$.when(foo).then(function() {
doSomethingElse();
@jkup
jkup / deep-learning-resources.md
Last active August 29, 2015 14:13
Deep Learning Resources
def capitalizeAll(args: String*) = {
args.map (_.capitalize)
}
capitalizeAll("hello", "goodbye", "farewell")
// --vs--
function capitalizeAll(Array $words) {
return array_map(function($word) {
# Set the prefix to ^A.
unbind C-b
set -g prefix ^A
bind a send-prefix
# Bind appropriate commands similar to screen.
# lockscreen ^X x
unbind ^X
bind ^X lock-server
unbind x
### Keybase proof
I hereby claim:
* I am m1ck3y on github.
* I am jkuperman (https://keybase.io/jkuperman) on keybase.
* I have a public key whose fingerprint is 6CB2 9832 5521 F909 9628 158F 536E 2E1B B117 AC5E
To claim this, I am signing this object: