Skip to content

Instantly share code, notes, and snippets.

View rhoboat's full-sized avatar

Rho rhoboat

View GitHub Profile
@rhoboat
rhoboat / mappings_reindex_scripts.md
Last active January 3, 2018 18:36
mappings and reindex scripts

Not allowed:

"mappings": {
  "tweet": {
    "properties": {
      "innerTweet": {
        "properties": {
          "title": {
            "type": "keyword"
          },

DFP Service

Node library we can use: https://github.com/spanishdict/node-google-dfp-wrapper

  • I read through the tests and the code, and it seems straightforward to use. It has implemented everything we need for creating orders, line items, creatives, and associations. It also has some steps for authentication. The tests and fixtures offer examples of how to use the code as well.

Create a Delivery

To create an order, line items, and creatives, we call the Create method on the Delivery module in the DFPService. Alternatively we can just have a CreateDelivery method exported on DFPService.

@rhoboat
rhoboat / list.txt
Created February 5, 2017 19:04
Barack Obama's Reading List
For Daughters
1. The Naked and the Dead, Norman Mailer
2. One Hundred Years of Solitude, Gabriel García Márquez
3. The Golden Notebook, Doris Lessing
4. The Woman Warrior, Maxine Hong Kingston
Independent Bookstores
1. Brown Girl Dreaming, Jacqueline Woodson
2. Heart of Darkness, Joseph Conrad
3. Nora Webster, Colm Toibin
4. The Laughing Monsters, Denis Johnson

Using nginx locally

brew install nginx
  • nginx.conf lives in /usr/local/etc/nginx/nginx.conf
  • Custom server setups go in /usr/local/etc/nginx/servers/*.conf
server {

#Setting up Nginx on Your Local System ###by Keith Rosenberg

##Step 1 - Homebrew The first thing to do, if you're on a Mac, is to install homebrew from http://mxcl.github.io/homebrew/

The command to type into terminal to install homebrew is:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@rhoboat
rhoboat / webpack-npm-install.sh
Last active September 28, 2016 22:59 — forked from kkemple/webpack-npm-install.sh
setup webpack
npm i -D webpack webpack-dev-server babel-cli babel-core babel-eslint babel-loader babel-plugin-transform-runtime babel-preset-2015 babel-presetreact babel-preset-stage-0 css-loader file-loader postcss-loader style-loader url-loader standard-loader extract-text-webpack-plugin clean-webpack-plugin copy-webpack-plugin html-webpack-plugin precss node-sass autoprefixer normalize.css
npm i -S react react-dom react-router hapi inert
@rhoboat
rhoboat / error.js
Last active August 29, 2015 14:25
custom error class (uses lodash)
'use strict';
import lodash as _ from 'lodash';
/*
options can be:
- name: The name property represents a name for the type of error.
See this for throwing a custom error:
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name