You can post a json file with curl
like so:
curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION
so for example:
for (var i=1;i<=100;i++){ | |
var s = ''; | |
if (i % 3 === 0) s += 'Fizz'; | |
if (i % 5 === 0) s += 'Buzz'; | |
console.log(s ? s : i); | |
} |
Some hastily compiled resources for a class on computer ethics. Suggestions/improvements welcome.
Some interesting books by contemporary figures:
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style type="text/css"> | |
#map_canvas { | |
height: 300px; | |
width: 300px; | |
} |
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
// returns an array of localStorage items in key/value pairs based on a query parameter | |
// returns all localStorage items if query isn't specified | |
// query can be a string or a RegExp object | |
function findLocalItems (query) { | |
var i, results = []; | |
for (i in localStorage) { | |
if (localStorage.hasOwnProperty(i)) { | |
if (i.match(query) || (!query && typeof i === 'string')) { | |
value = JSON.parse(localStorage.getItem(i)); |
<!DOCTYPE html> | |
<html lang="en" class="element"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>grid experiment</title> | |
<link rel="stylesheet" href="https://elementcss.neocities.org/dist/element-0.0.1.min.css"> | |
<style> | |
table { width: 100%; table-layout: fixed; } |
/* | |
Now a real module used in production! | |
https://github.com/ungoldman/choo-store | |
*/ | |
class Store { | |
constructor (opts) { | |
opts = opts || {} |