I hereby claim:
- I am dougvk on github.
- I am dougvk (https://keybase.io/dougvk) on keybase.
- I have a public key whose fingerprint is A94E DBDA 1DE6 7834 DDE2 5DFF BDED 2E9E ADEF 4B1A
To claim this, I am signing this object:
$(document).on("submit", "#test_form", function(e) { | |
e.preventDefault(); | |
var self = $(this), | |
url = self.attr("action"), | |
// Note: CSRF token already added to HTTP Headers | |
ajax_req = $.ajax({ | |
url: url, | |
type: "POST", | |
data: { | |
// Send the form data with POST request |
if request.is_ajax(): | |
if form.is_valid(): | |
# I doubt we would ever save on an ajax POST. | |
goal = form.save() | |
# Serialize the goal in json format and send the | |
# newly created object back in the reponse | |
# have to put it in a list even if it's just one instance. | |
data = serializers.serialize('json', [goal,]) | |
else: |
class PageObjectDelegator | |
include Capybara::DSL | |
include Rails.application.routes.url_helpers | |
def initialize(*args) | |
# Create a `path` => `page object model` hash | |
@pages = {} | |
@pages[foo_bar_path] = FooBarPage.new("Foo Bar") | |
@pages[baz_path] = BazPage.new("Baz") | |
end |
import re | |
from cPickle import dump | |
from requests import get | |
DEFAULT_TICKERS = ['goog', 'aapl'] | |
URL = 'http://www.sec.gov/cgi-bin/browse-edgar?CIK={}&Find=Search&owner=exclude&action=getcompany' | |
CIK_RE = re.compile(r'.*CIK=(\d{10}).*') | |
cik_dict = {} | |
for ticker in DEFAULT_TICKERS: |
""" | |
Import and process yahoo data | |
""" | |
from cStringIO import StringIO | |
import requests | |
from datetime import datetime | |
from pandas import DataFrame | |
from pandas.io.parsers import read_table |
{ | |
"type": "FeatureCollection", | |
"features": [ | |
{ | |
"type": "Feature", | |
"geometry": { | |
"type": "Point", | |
"coordinates": [ | |
-0.33649000000001, | |
45.69892000000001 |
FROM ubuntu:latest | |
RUN apt-get update -y && apt-get install -y \ | |
libgmp3-dev libsigsegv-dev openssl libssl-dev \ | |
libncurses5-dev git make exuberant-ctags automake autoconf libtool \ | |
g++ ragel cmake re2c curl | |
RUN git clone https://github.com/urbit/urbit /urbit | |
WORKDIR /urbit |
I hereby claim:
To claim this, I am signing this object:
ALT WOKE. Feature list if you'd like to adopt it:
Less clumsy than 'anti-authoritarian liberal who is suspicious but not knee-jerk opposed to language policing'
Signals modern, urban, pro-tech liberal as opposed to 60s boomer liberal values clearly, includes hat tip to civil rights
More pronounceable than 'liberal-tarian' (which is invariably misread as 'libertarian' if you don't include the hyphen and attach an explanation for those who haven't heard the term)
Clearer to people under 30 than 'McGovern libertarian' (Marc Andreessen's preferred label), which is kinda where this came from
Create a digital ocean docker box using the docker-machine command: https://docs.docker.com/machine/drivers/digital-ocean/
Run docker-compose -f docker-compose.yml.production build
Run docker-compose -f docker-compose.yml.production up -d
If you look at the docker-compose file, you'll see it builds the nginx
and node
apps. nginx
has a configurable .crt
file,
which you should change. Same with default.conf
, based on your specifications.
The first time you run the docker-compose
command, it will spin up the nginx
and the ehub
box. The ehub
box will not work.