You can post a json file with curl
like so:
curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION
so for example:
#!/bin/bash | |
while :; do | |
verf=$(cat /dev/urandom | tr -dc '0-9' | fold -w 8 | head -n 1) | |
pin=$(cat /dev/urandom | tr -dc '0-9' | fold -w 5 | head -n 1) | |
ip=$(printf "%d.%d.%d.%d\n" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))") | |
function brush() { | |
// Use x.domain to filter the data, then find the max and min duration of this new set, and set y.domain to that | |
x.domain(brush.empty() ? x2.domain() : brush.extent()); | |
var dataFiltered = data.filter(function(d, i) { | |
if ( (d.date >= x.domain()[0]) && (d.date <= x.domain()[1]) ) { | |
return this; | |
} | |
}) | |
var buildersFiltered = color.domain().map(function(name) { | |
return { |
Created by Christopher Manning
[](http://bl.ocks.org/d/1703449/#/[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269, 2178309, 3524578, 5702887, 9227465, 14930352, 24157817, 39088169]43/0/1) [](http://bl.ocks.org/d/1703449/#/
Vim has two modes insertion mode and command mode. The editor begins in command mode, where the cursor movement and text deletion and pasting occur. Insertion mode begins upon entering an insertion or change command. [ESC]
returns the editor to command mode (where you can quit, for example by typing :q!
). Most commands execute as soon as you type them except for "colon" commands which execute when you press the ruturn key.
:x
Exit, saving changes :q
Exit as long as there have been no changes ZZ
Exit and save changes if any have been made :q!
Exit and ignore any changes# Answer to a question on Flask mailing list | |
# http://librelist.com/browser//flask/2012/6/30/using-ajax-with-flask/ | |
# NOTE: *REALLY* don't do the thing with putting the HTML in a global | |
# variable like I have, I just wanted to keep everything in one | |
# file for the sake of completeness of answer. | |
# It's generally a very bad way to do things :) | |
# | |
from flask import (Flask, request, jsonify) | |
app = Flask(__name__) |
Here's a list of resources that have been helpful for me in getting acquainted with Ember.js, in no particular order. Ember is relatively young and changing really fast, so I found that searching for answers on Google and Stack Overflow was not quite as easy as it is with Rails. Try to stick with resources that have been written in the past few months. Look at the older stuff too but remember that things have likely changed.
The official Ember guides. The guides are useful for a general overview of what's going on in Ember, and the API docs will help you get familiar with the methods that are available to you. http://guides.emberjs.com/v1.13.0/
Ember Inspector for Debugging. https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi