Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');| import { WrapQuery } from 'graphql-tools' | |
| import { SelectionSetNode, Kind } from 'graphql' | |
| /** | |
| * Creates a WrapQuery schema transform that appends the specified field to the selection set of the | |
| * specified parent field name. This can be used to assure queries used by dataloader include the | |
| * field used to align the results (usually some "id" field) | |
| * @param parentFieldName | |
| * @param appendedFieldName | |
| */ |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');| Install lldb-3.6 and llnode. On Ubuntu: | |
| git clone https://github.com/indutny/llnode | |
| cd llnode | |
| sudo apt-get install lldb-3.6 lldb-3.6-dev | |
| git clone https://chromium.googlesource.com/external/gyp.git tools/gyp | |
| ./gyp_llnode -Dlldb_dir=/usr/lib/llvm-3.6/ -Dlldb_lib=lldb-3.6 | |
| make -C out/ -j9 | |
| sudo make install-linux |
TL;DR
Create a backup:
pg_dumpall > mybackup.sqlPerform the upgrade:
sudo pg_dropcluster 9.4 main --stop| sudo apt-get remove --purge "^mysql.*" | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| sudo rm -rf /var/lib/mysql | |
| sudo rm -rf /var/log/mysql | |
| echo mysql-apt-config mysql-apt-config/enable-repo select mysql-5.7-dmr | sudo debconf-set-selections | |
| wget http://dev.mysql.com/get/mysql-apt-config_0.2.1-1ubuntu12.04_all.deb | |
| sudo dpkg --install mysql-apt-config_0.2.1-1ubuntu12.04_all.deb | |
| sudo apt-get update -q | |
| sudo apt-get install -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" mysql-server |
Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.
For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.
But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.
SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil
| comment.block.antlr | |
| comment.block.applescript | |
| comment.block.bibtex | |
| comment.block.c | |
| comment.block.css | |
| comment.block.d | |
| comment.block.documentation | |
| comment.block.documentation.javadoc | |
| comment.block.documentation.js | |
| comment.block.documentation.json |
| /* Extend the Underscore object with the following methods */ | |
| // Rate limit ensures a function is never called more than every [rate]ms | |
| // Unlike underscore's _.throttle function, function calls are queued so that | |
| // requests are never lost and simply deferred until some other time | |
| // | |
| // Parameters | |
| // * func - function to rate limit | |
| // * rate - minimum time to wait between function calls | |
| // * async - if async is true, we won't wait (rate) for the function to complete before queueing the next request |