Skip to content

Instantly share code, notes, and snippets.

wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install elixir htop git erlang-dev libyaml-dev
mkdir project
cd project
git clone https://github.com/datagovuk/apiserver.git
cd apiserver
mix deps.get
ckan=# select id,resource_group_id from resource where hash='72e11e198bd98e4e6ae058f42a9eba212ebf29d4';
id | resource_group_id
--------------------------------------+--------------------------------------
ad6a5562-5781-4444-8704-5d55f2336208 | 19902fb4-e2aa-41df-a21f-3a1da451faca
53d0ccfe-5bd4-42dc-ae46-ebfb9a190b25 | 19902fb4-e2aa-41df-a21f-3a1da451faca
31110d50-3269-42ee-9956-c140a20c338d | 19902fb4-e2aa-41df-a21f-3a1da451faca
4d230f23-a530-4482-9e67-19a2e58cfc13 | 19902fb4-e2aa-41df-a21f-3a1da451faca
48a6a7ba-bdb2-49bb-8f8f-9b35a3502b1d | 19902fb4-e2aa-41df-a21f-3a1da451faca
9f5a0bd2-d645-404a-8854-ceb599bf61b2 | 19902fb4-e2aa-41df-a21f-3a1da451faca
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import csv
sys.stdin = os.fdopen( sys.stdin.fileno(), "rU" )
writer = csv.writer(sys.stdout)

Keybase proof

I hereby claim:

  • I am rossjones on github.
  • I am rossjones (https://keybase.io/rossjones) on keybase.
  • I have a public key whose fingerprint is 5073 3B1C BF0F 242E E276 689A D75B 5893 B1F2 4B0F

To claim this, I am signing this object:

@rossjones
rossjones / README.md
Created March 10, 2014 18:16 — forked from rufuspollock/README.md
Global Fossil Fuel CO2 Emissions 1751-Present - README is empty

README is empty

# Construct a GeoJSON extent so ckanext-spatial can register the extent geometry
extent_string = self.extent_template.substitute(
minx = extras['bbox-east-long'],
miny = extras['bbox-south-lat'],
maxx = extras['bbox-west-long'],
maxy = extras['bbox-north-lat']
)
try:
extent_json = json.loads(extent_string)
[DEFAULT]
debug = true
# Uncomment and replace with the address which should receive any error reports
#email_to = you@yourdomain.com
smtp_server = localhost
error_email_from = paste@localhost
[server:main]
use = egg:Paste#http
host = 0.0.0.0
from django.db.backends.signals import connection_created
def new_connection_created(sender, connection, **kwargs):
c = connection.cursor()
c.execute("SET client_encoding='ASCII';")
connection_created.connect(new_connection_created)
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
defmodule Exlx do
"""
This is the main entry point. Pass a filename to a file that looks like:
When "today" is "thursday"
And "tomorrow" is "friday"
"""
def process_block(filename) do
File.stream!(filename, [:utf8, :read]) |> Enum.take_while fn(x) ->