-
The benchmarks used by Marko, with one benchmark containing only a single component with ~50 lines of code, and the other 3 components with one of them fully static markup, are typical micro-benchmarks created to the advantage of certain implementation details. They are too isolated and too trivial to justify across-the-board performance claims.
-
For client-side performance I recommend using the 3rd party js-framework-benchmark as a more neutral reference; the benchmark tests a much bigger workload and covering a much more comprehensive performance scenarios. According to the data from the latest round Vue actually outperforms Marko. That said, even this benchmark doesn't reflect real world performance where much more overhead comes from big component trees.
-
Vue has significantly improved SSR performance for
View ResumeCreator.js
import assert from 'assert'; | |
updateStepFourProps(type, operation, id) { | |
assert(Array.isArray(this.state[type]), `Cannot do operation on type '${type}'`) | |
switch (operation) { | |
case 'add': | |
this.setState({ | |
[type]: this.state[type].concat(id) | |
}) |
View lodash.get.js
/** | |
* getProp - Simple lodash.get implementation | |
* @author @harish2704, @muffypl, @pi0 | |
* @param {Object} object | |
* @param {String|Array} path | |
* @param {*} defaultVal | |
*/ | |
function getProp (object, path, defaultVal) { | |
const _path = Array.isArray(path) | |
? path |
View marko-perf.md
View aliasthat.sh
function aliasthat { | |
if [ -n ${1} ]; then | |
fc -e "sed -i -e \"s/^.*/echo alias $1=\\\"'\\\"\'&\'\\\"'\\\" >> ~\/.bash_alias/\"" | |
. ~/.bash_alias | |
fi | |
} |
View count.js
// $ yarn add request request-promise | |
// $ node count userA userB | |
const request = require('request-promise') | |
const get = resource => request({ | |
url: /^https/.test(resource) ? resource : `https://api.github.com/${resource}`, | |
headers: { | |
'User-Agent': 'GitHub Contrib Counter', | |
'Authorization': 'token YOUR_PERSONAL_ACCESS_TOKEN' |
View simple-sync-posix-hexdumper.c
#include <errno.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> |
View README.md
Demo of multipart form/file uploading with hapi.js
.
Usage
npm install
npm run setup
npm run server
Then ...
View GitHub protocol comparison.md
Primary differences between SSH and HTTPS. This post is specifically about accessing Git repositories on GitHub.
Protocols to choose from when cloning:
plain Git, aka git://github.com/
-
Does not add security beyond what Git itself provides. The server is not verified.
If you clone a repository over git://, you should check if the latest commit's hash is correct.
View Modelsim Altra - Ubuntu
#!/bin/bash | |
#TODO : install setup.run to /opt ... | |
ALTERA_PATH=/opt/altera/*/ | |
#32bit_deps | |
sudo dpkg --add-architecture i386 | |
sudo apt-get update |
View cake_helper_code_completion.php
<?php | |
/** | |
* CakePHP Helper Code Completion | |
* @author junichi11 | |
* | |
* install NetBeans 7.0 && cakephp-netbeans plugin | |
* http://netbeans.org | |
* https://github.com/evilbloodydemon/cakephp-netbeans/tree/autocomplete | |
* /path/to/yourproject/nbproject/cake_helper_code_completion.php | |
* |
NewerOlder