Getting seconds or milliseconds since January 1, 1970, 00:00:00 GMT in various languages
// ms
struct timespec spec;
clock_gettime(CLOCK_REALTIME, &spec);Installing project specific tools like react-native globally is yucky.
Even when it's just thin CLI wrappers.
Unfortunately react-native actively breaks local npm binaries by forcing a broken bin stub into each project.
So if you added ./node_modules/.bin to your $PATH,
every attempt of running react-native inside of a project will fail
with an annoying (and wrong) claim that you installed react-native globally.
The easiest solution I found so far:
npm install --save react-native-cli in your React Native projectThe following is just a proposal & not yet finished.
The biggest change in 3.x is that gofer no longer uses request behind the scenes.
Also we're trying to align the interface more closely with fetch.
Whenever we return a promise, it will be Bluebird-flavored.
Simple fetch-style usage:
Options:
-t/--test command - alternate test suite command. default: npm test<version> - 1.2.3; or, for auto increments: patch, minor, major<version> is not specified, npub will try to deduce it from the
Github PRs that were merged, using semver-minor style labels.| { | |
| // babel-style base rules | |
| "extends": "airbnb/base", | |
| "rules": { | |
| // This allows things like `reduce((a, b) => a + b)` | |
| // Not 100% sure if that's worth the potential cost of badly named identifiers | |
| "id-length": 0 | |
| } | |
| } |
Manual linking together of -wd and -core:
import initTestium from 'testium-core';
import createDriver from 'testium-driver-wd';
import {test} from 'tap';
test('my test', async t => {
let b = await initTestium().then(createDriver);
await b.navigateTo('/foo');| VERSION=$1 | |
| PACKAGE_TAG=node-${VERSION} | |
| curl -sSo ${PACKAGE_TAG}-linux-x64.tar.gz "https://nodejs.org/dist/${VERSION}/${PACKAGE_TAG}-linux-x64.tar.gz" | |
| tar -xzf ${PACKAGE_TAG}-linux-x64.tar.gz | |
| mv ${PACKAGE_TAG}-linux-x64 ${PACKAGE_TAG} | |
| ./${PACKAGE_TAG}/bin/node -v | |
| rm ${PACKAGE_TAG}/README.md ${PACKAGE_TAG}/CHANGELOG.md ${PACKAGE_TAG}/LICENSE | |
| tar -cvzf ${PACKAGE_TAG}.tar.gz ${PACKAGE_TAG} | |
| curl --upload-file $PACKAGE_TAG.tar.gz http://config/package/$PACKAGE_TAG.tar.gz |
| diff --git a/Source/devtools/front_end/network/RequestJSONView.js b/Source/devtools/front_end/network/RequestJSONView.js | |
| index f88c212..a5b3eed 100644 | |
| --- a/Source/devtools/front_end/network/RequestJSONView.js | |
| +++ b/Source/devtools/front_end/network/RequestJSONView.js | |
| @@ -152,7 +152,7 @@ WebInspector.RequestJSONView.parseJSON = function(text) | |
| text = text.substring(inner.start, inner.end + 1); | |
| // Only process valid JSONP. | |
| - if (suffix.length && !(suffix.trim().startsWith(")") && prefix.trim().endsWith("("))) | |
| + if (suffix.trim().length && !(suffix.trim().startsWith(")") && prefix.trim().endsWith("("))) |
| #!/usr/bin/env bash | |
| ./configure | |
| make -j4 | |
| ./iojs cls-failure.js |
| getName() { | |
| &"Quinn"; | |
| } | |
| # Result: | |
| # | |
| # async function getName() { | |
| # return Promise.resolve("Quinn"); | |
| # } |