Skip to content

Instantly share code, notes, and snippets.

@jmatsushita
jmatsushita / Wordpress Hardening
Last active December 10, 2015 15:09
Hardening instructions for Wordpress. The Admin Dashboard wordpress and plugin updates won't work (they will need to be updated manually). "By employing some, ok all of the recommendations above you have effectively disabled WordPress from modifying its own files, admin users no longer have write permission to all files, and the themes / plugins…
# cd to wordpress install root
# only the lunix user account should be able to write files.
chown -R wp_user? .
# the apache process should be able to read files.
chmod -R 750 .
chgrp -R apache .
#uploads folder needs apache to be able to write
chmod -R 770 ./wp-content/uploads/
Install on Ubuntu
=================
Looked at the OBP-VM instructions to setup from source.
Social Finance (aka OBP Server)
-------------------------------
cd /opt
git clone https://github.com/OpenBankProject/Social-Finance.git obps
#!/usr/bin/python
import os
import json
def update(module, state, name, auto, hotplug, iface_type, addr_family, address,
netmask, nameservers, gateway, provider):
try:
fd = open('/etc/network/interfaces')
= OpenOil - BP Data Import (100 Records)
== Setup
//setup
//hide
[source, cypher]
----
LOAD CSV FROM 'https://raw.githubusercontent.com/iilab/openoil/master/data/BP100.csv' AS line
MERGE (c:Company { name: line[0], ID: line[6], sourceURL: line[7], sourcePubDate: line[9]})
//setup
[source,cypher]
----
create (_0:`Company` {`name`:"Child Company Name"})
create (_1:`Company` {`name`:"Parent Company Name"})
create (_2:`Company` {`name`:"Air BP Albania SHA"})
create (_3:`Company` {`name`:"BP Holdings International B V"})
create (_4:`Company` {`name`:"Gas Link S A"})
create (_5:`Company` {`name`:"Dinarel S A"})
= OpenOil - Structr
== Setup Data Model
[source, cypher]
----
CREATE (company:Company { name: 'BP Exploration (Epsilon) Limited', aliases: 'BP Exp, BP Exp LTD', oc_id: 'gb/01004984', headquarters:'', people:'', founded_in:'1992', website:'', document:''})
CREATE (country:Country { name: 'Nigeria'})
CREATE (companytype:CompanyType { name:'Limited Liability Company'})
CREATE (contract:Contract { name: 'Another Nigeria Indirect Prod Contract', official_title:'', description:'', value_usd:'', value_currency_amount:'10000000', value_currency_unit: 'EUR', announced_at:'2012-08', started_at:'2014', ended_at: '', duration_months:'48', field:'', license_area:''})
@jmatsushita
jmatsushita / OpenOil-Structr-Monomorphic
Last active August 29, 2015 14:03
OpenOil-Structr-Monomorphic
= OpenOil - Structr
== Setup Data Model
[source, cypher]
----
CREATE (company:Company { name: 'BP Exploration (Epsilon) Limited', aliases: 'BP Exp, BP Exp LTD', oc_id: 'gb/01004984', headquarters:'', people:'', founded_in:'1992', website:'', document:''})
CREATE (country:Country { name: 'Nigeria'})
CREATE (companytype:CompanyType { name:'Limited Liability Company'})
CREATE (contract:Contract { name: 'Another Nigeria Indirect Prod Contract', official_title:'', description:'', value_usd:'', value_currency_amount:'10000000', value_currency_unit: 'EUR', announced_at:'2012-08', started_at:'2014', ended_at: '', duration_months:'48', field:'', license_area:''})
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
//setup
[source,cypher]
----
CREATE
(_1 {name:"asfd asdf"}),
(_2 {name:"Aker Solutions"})
----
//graph