This is a temporary solution. Might change in the near future, this depends on how create-react-app will implement testing.
create-react-app quick-test-example
cd quick-test-example
npm run eject
There is no way to store an empty object/array/null value. | |
There are also no actual arrays. Array values get stored as objects with integer keys. | |
(If all keys are integers, it will be returned as an array.) | |
Basically, it's one giant tree of hashes with string keys. | |
Simply write a value to any location, and the intermediary locations will automatically come into existance. | |
── Classes ── | |
DataSnapshot : Container for a subtree of data at a particular location. |
/*<?php | |
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s", | |
//\u000A\u002F\u002A | |
class PhpJava { | |
static function main() { | |
echo(//\u000A\u002A\u002F | |
"Hello World!"); | |
}} | |
//\u000A\u002F\u002A | |
PhpJava::main(); |
import React from 'react'; | |
import { shallow } from 'enzyme'; | |
import MyComponent from '../src/my-component'; | |
const wrapper = shallow(<MyComponent/>); | |
describe('(Component) MyComponent', () => { | |
it('renders without exploding', () => { | |
expect(wrapper).to.have.length(1); | |
}); |
With the release of Node 6.0.0, the surface of code that needs transpilation to use ES6 features has been reduced very dramatically.
This is what my current workflow looks like to set up a minimalistic and fast microservice using micro and async
+ await
.
#!/usr/bin/env python | |
""" | |
Modification of `python -m SimpleHTTPServer` with a fallback to /index.html | |
on requests for non-existing files. | |
This is useful when serving a static single page application using the HTML5 | |
history API. | |
""" | |
import { applyMiddleware, compose, createStore } from "redux" | |
import { reduxReactIntl } from "redux-react-intl" | |
import thunk from "redux-thunk" | |
import rootReducer from "./reducers" | |
const createStoreFactory = compose( | |
applyMiddleware(thunk), | |
reduxReactRouter({ routes, createHistory }) | |
) |
This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.
http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL
#!/bin/sh | |
#https://github.com/TrilbyWhite/interrobang | |
#https://github.com/TrilbyWhite/swifer | |
#https://bbs.archlinux.org/viewtopic.php?id=167804 | |
#https://github.com/sschober/surf-scripts.git | |
timestamp=`date +%s` | |