Skip to content

Instantly share code, notes, and snippets.

@darth-cheney
darth-cheney / dabblet.css
Created March 8, 2013 01:39 — forked from anonymous/dabblet.css
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
@import url(http://fonts.googleapis.com/css?family=IM+Fell+DW+Pica:400,400italic);
body {
text-align: center;
margin-top: 40px;
margin-bottom: 50px;
}
#logo {
@darth-cheney
darth-cheney / dabblet.css
Created March 8, 2013 01:39
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
@import url(http://fonts.googleapis.com/css?family=IM+Fell+DW+Pica:400,400italic);
body {
text-align: center;
margin-top: 40px;
margin-bottom: 50px;
}
#logo {
@darth-cheney
darth-cheney / dabblet.css
Created March 8, 2013 02:37
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
#container {
width: 100%;
height: 250px;
display: block;
position: relative;
}
@darth-cheney
darth-cheney / bootstrap.js
Created May 13, 2014 21:56
Sails ENV Settings
module.exports.bootstrap = function(cb) {
// It's very important to trigger this callack method when you are finished
// with the bootstrap! (otherwise your server will never lift, since it's waiting on the bootstrap)
// Development Only settings
if (sails.config.environment === 'development'){
sails.config.db_environment = sails.config.db_development
} else if (sails.config.environment === 'production'){
sails.config.db_environment = sails.config.db_development
{
count: 2,
results: [
{
id: '1976STATEMOR43', // id is just another key/val like other returned data
subject: 'MORE PAPER TOWELS',
drafter: 'Tom Thompson'
},
{
id: '1978STATEMGG',
@darth-cheney
darth-cheney / process-data.js
Last active August 29, 2015 14:03
Example of processing return-data
/*
* The following three examples are how
* one can easily process data when
* the results array simply contains
* anonymous objects and the IDs
* are just key/value pairs
*
*/
data = fetchAPIData(query);
@darth-cheney
darth-cheney / gist:718877489d143048009a
Last active August 29, 2015 14:07
Quick Notes on Declass Schema

Rules for the Declass Schema

  1. All collections should be held in their own database nameddeclassification_[collection], where [collection] is the name of the specific document collection. For example, currently we have declassification_frus for the FRUS collection.

  2. Because all collections are made up of documents, all collection databases should have a table called docs which contains fields relevant to that document type. The different fields in various docs tables will vary from collection to collection, because different document collections have different structures. That said, there are some things that are common across document collections:

    a) A body field -- this is what we determine to be the main textual content of a given document b) An id field as a unique primary key c) Date information, most of the time, in some form. d) A subject, title, or some other quick descriptive string. Documents can have multiple, for example both a subject and a title

@darth-cheney
darth-cheney / gist:2dbe824340badce46db5
Last active August 29, 2015 14:07
Draft Pipeline Documentation Instructions

How to Document a Pipeline

Purpose of this Document

This document describes the common format in which one should compose the written component of a Document Pipeline.

General Requirements

Each collection that is processed as a part of the Declassification Engine project should have one of these documents in its corresponding project folder on the Processing Repo of the shared Github account. Some general rules:

  1. All Pipeline documents will be written in Markdown.
@darth-cheney
darth-cheney / gist:c4f47d9044bc9aed22ba
Last active August 29, 2015 14:07
MGB Example Collection Pipeline

MGB Collection Pipeline

Description and Updates

Collection of documents pertaining to the Mutant Grizzly Bear (MGB) project. Consists of "Bear Reports" (BRs) that have been declassified as a part of regular review.

Updated: 10-24-2014 Current Stage: Extraction

Database Info

Update: 10-30-2014 -- Added results of Entity Extraction for geolocation as the places and place_doc tables. All tables for this collection are stored in the declassification_mgb database. Those tables are:

@darth-cheney
darth-cheney / kissinger_test_1.sql
Created October 10, 2014 14:50
Kissinger Top Countries Query
SELECT * from declassification_kissinger.country_doc AS country_doc
JOIN declassification_kissinger.countries AS countries
ON country_doc.country_id=countries.id
ORDER BY country_doc.country_count DESC
LIMIT 20;