Skip to content

Instantly share code, notes, and snippets.

View bcomnes's full-sized avatar
👽

Bret Comnes bcomnes

👽
View GitHub Profile
<h2>Multipart</h2>
<form action="/upload" enctype="multipart/form-data" method="post">
<input type="text" name="title"><br>
<input type="file" name="upload" multiple="multiple"><br>
<input type="submit" value="Upload">
</form>
<hr>
<h2>Standard</h2>
@bear
bear / baseline.sh
Last active August 29, 2015 14:06
bash script to baseline a server
#!/bin/bash
# assumes a fairly recent Ubuntu - may work on Debian or others but needs testing
# assumes you have your .ssh/config setup to specify a user and key for the host
HOST=$1
KEY=$2
if [ "${HOST}" == "" ]; then
echo "you must provide a hostname"
@max-mapper
max-mapper / readme.md
Last active August 29, 2015 14:18
dat beta design notes
  • dat data model
    • commit graph (mutable)
      • Merkle DAG
      • integrity check a root hash, and know all children are ok too (efficient!)
      • deduplication of common children
      • can content address all the nodes in the datastructure
      • can reveal single path from node to a root (with adjacent hashes) and prove object must be in dag
    • operation database (mutable)
      • protobufs in leveldb
  • prototbufs support efficient encodings and backwards compat
@ungoldman
ungoldman / pdx-ftp-inventory.md
Created April 6, 2015 00:52
ftp02.portlandoregon.gov file inventory

These are the results of running the following command at the root of a copy of ftp://ftp02.portlandoregon.gov from 2015-03-31

find . -type f | rev | cut -d . -f1 | rev | sort | uniq -ic | sort -rn
17499 pdf
6807 jpg
3289 JPG
@shama
shama / downup.js
Created April 27, 2015 00:37
Data down, actions up idea module
var h = require('virtual-dom/h')
var xtend = require('xtend/mutable')
var merge = require('xtend')
function DownUp(data) {
if (!(this instanceof DownUp)) return new DownUp(data)
var self = this
this.set({
tagName: 'div',
childViews: [],
@max-mapper
max-mapper / readme.md
Last active August 29, 2015 14:20
trying to get perf-basic-prof working with electron

problems

  • I can't get the CSV to load on thlorenz' page (see attached)
  • I also don't get a mapfile in my tmpdir so maybe i'm doing something wrong?

Summary of Write the Docs:

A smattering of good stuff from the conf:

Day 1:

  1. You won't know what you need to fix (in the docs) until you validate what you've written by having someone else read it
  2. It takes a lot to break through to understanding (ex. Helen Kellar) but what we do to make sure we're communicating properly matters.
  3. When testers and tech writers work together, you get a better end product because the tester is the voice of the customer when the customer isn't around.
  4. Look back at past tickets--were they answered using a reference to a doc? could it be answered with a reference to an existing doc? add a link to the doc or create a doc for it if there isn't one.

Creating a Post

Creating a post, specifying properties from the microformats2 vocab. The type and properties map to the output of the Microformats 2 parsed result.

Form-encoded requests have a property h=* which specifies the type of object being created. All other properties are considered properties of the object being created.

h=entry&
content=hello+moon&
category[]=indieweb&amp;
@alivesay
alivesay / promiseToCallback.js
Created June 24, 2015 02:49
promiseToCallback
function promiseToCallback(promise, callback) {
promise
.then(function (result) {
return callback(null, result);
})
.catch(function (err) {
return callback(err, null);
});
}