This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function inlineWorker() { | |
let recLength = 0, | |
recBuffers = [], | |
sampleRate, | |
numChannels; | |
this.onmessage = function(e){ | |
switch(e.data.command){ | |
case 'init': | |
init(e.data.config); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Field } from 'redux-form'; | |
export default function FormField(props) { | |
const { component: Component, ...rest } = props; | |
const renderField = (field) => { | |
const { input, ...other } = field; | |
return ( | |
<Component {...input} {...other} /> | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ window.open('https://hangouts.google.com/start'); })(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Schema, arrayOf, normalize } from "normalizr" | |
const input = { | |
id: 100, | |
title: 'Playing with normalizr', | |
text: 'Normalize deep nested query with normalizr', | |
likes: { | |
total: 1, | |
page: 1, | |
limit: 10, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { combineEntitiesReducers } from 'redux-entities'; | |
import messages from './messages'; | |
import tickets from './tickets'; | |
export default combineEntitiesReducers({ | |
messages, | |
tickets | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { PropTypes, Component, Children, cloneElement } from 'react'; | |
export default class Fullscreen extends Component { | |
static propTypes = { | |
children: PropTypes.node | |
}; | |
state = { | |
width: 0, | |
height: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This example shows the difference | |
// between classNames, classNames/bind and classnames-loader | |
// submit-button.css | |
/* | |
:local .className { | |
color: green; | |
background: red; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# StackOverflow: http://stackoverflow.com/questions/21215059/cant-use-nvm-from-root-or-sudo | |
# Source: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-with-nvm-node-version-manager-on-a-vps | |
# The below command seems to fix the problem | |
n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local | |
# The above command is a bit complicated, but all it's doing is copying whatever version of node | |
# you have active via nvm into the /usr/local/ directory (where user installed global files should | |
# live on a linux VPS) and setting the permissions so that all users can access them. |
NewerOlder