Demo of multipart form/file uploading with hapi.js
.
npm install
npm run setup
npm run server
Then ...
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
</head> | |
<body> |
alias c=clear | |
alias la="ls -al" | |
eval $(thefuck --alias) | |
# export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\W\[\033[m\]\$ " | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi |
<?php | |
/* From https://www.usps.com/send/official-abbreviations.htm */ | |
$us_state_abbrevs_names = array( | |
'AL'=>'ALABAMA', | |
'AK'=>'ALASKA', | |
'AS'=>'AMERICAN SAMOA', | |
'AZ'=>'ARIZONA', | |
'AR'=>'ARKANSAS', |
/** @jsx React.DOM */ | |
"use strict"; | |
var util = { | |
// findPos() by quirksmode.org | |
// Finds the absolute position of an element on a page | |
findPos: function (obj) { | |
var curleft = 0, | |
curtop = 0; |
//WelcomeApp: App Container, houses other components | |
//and creats underlying servicing methods | |
var WelcomeApp = React.createClass({ | |
getInitialState: function(){ | |
return { name: this.props.name }; | |
}, | |
handleKeyUp: function(newVal) { | |
this.setState( {name: newVal } ); | |
}, | |
render: function(){ |
<?php | |
/** | |
* Add a "Rating" sort option | |
* | |
* @author David Nash <david@davidnash.com.au> | |
*/ | |
function custom_wpjmr_after_save_comment_review( $comment_id ) { | |
$wpjmr = WP_Job_Manager_Reviews::instance(); | |
$wpjmr->review->save_rating_average_post_meta( $comment_id ); | |
} |
var CommentBox = React.createClass({ | |
getInitialState: function(){ | |
return { name: this.props.name }; | |
}, | |
handleKeyUp: function() { | |
this.setState( {name: this.refs.name.value } ); | |
}, | |
render: function(){ | |
console.log( this.refs, this.state, this.props ); | |
return ( |
/** | |
* Provides the overlapping status between two elements | |
* based on the passed in Element objects | |
* | |
* @param {Element, Element} Element object of DOM | |
* @return {Boolean} overlap status or null if native object not received | |
*/ | |
const isOverlapping = (e1, e2) => { | |
if (e1.length && e1.length > 1) { | |
e1 = e1[0]; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Decoding Morse Code With JavaScript</title> | |
<style type="text/css"> | |
div.output {} | |
div.output p.message { |