Skip to content

Instantly share code, notes, and snippets.

@nickpresta
nickpresta / resources.md
Last active February 2, 2018 14:46
Learning Go

Go Resources

Install Go

Learning Go

Start in this order:

jest@16.0.0
babel@5.8.23
npm@3.9.5
node v4.4.3
@nickpresta
nickpresta / preprocessor.js
Created October 5, 2016 01:34
Babel 5 Jest Preprocessor
var babel = require('babel');
module.exports = {
process: function(src, filename) {
if (filename.indexOf('node_modules') === -1 && babel.canCompile(filename)) {
return babel.transform(src, {filename: filename}).code;
}
return src;
}
};
bash-completion binutils cscope erlang gdbm gifsicle git jpeg jq libevent libpng libssh libtiff macvim msgpack oniguruma openssl pcre python rabbitmq readline sqlite the_silver_searcher tmate tree unixodbc vim wget wxmac xz
onFooterClicked: (props, propName, componentName) => {
if (props.isFooterVisible) {
return React.PropTypes.func.isRequired(props, propName, componentName, 'prop');
}
return React.PropTypes.func(props, propName, componentName, 'prop');
}
  • Thing was fixed in React (#123, #456)
  • Another thing was fixed in React (#789, #000)
@nickpresta
nickpresta / NonNativeHTML5Backend.js
Last active April 10, 2017 06:14
react-dnd backend that ignores "native items" like files (for use in drag and drop image upload, etc)
import HTML5Backend from 'react-dnd-html5-backend/lib/HTML5Backend';
class NonNativeHTML5Backend extends HTML5Backend {
constructor(manager) {
super(manager);
// Rebind our overwritten methods
this.handleTopDrop = this.handleTopDrop.bind(this);
this.handleTopDropCapture = this.handleTopDropCapture.bind(this);
this.handleTopDragOver = this.handleTopDragOver.bind(this);
@nickpresta
nickpresta / .eslintrc
Created September 29, 2015 03:38
Eslint errors
{
"extends": "eslint:recommended",
"parser": "babel-eslint",
"plugins": [
"react",
"sorting"
],
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
$ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help json` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg> --save` afterwards to install a package and
save it as a dependency in the package.json file.
go get github.com/NickPresta/go-wave-workshop
# It should return nothing is successful
# If it doesn't work, please HipChat me the output of `go env`
# and the error from the go get above