This gist contains a list of tricks, commands and formula I collected while working with Open Refine.
See this blogpost: Merging Datasets with Common Columns in Google Refine
artoo.scrape('form#system-modules table tr:has(td input[type=checkbox]:checked)', { | |
title: {sel: 'td:nth-child(2) label'}, | |
version: {sel: 'td:nth-child(3)'}, | |
description: {sel: 'td:nth-child(4)'} | |
}, artoo.saveCsv); |
## Skeleton config file for RetroArch | |
# Save all save files (*.srm) to this directory. This includes related files like .bsv, .rtc, .psrm, etc ... | |
# This will be overridden by explicit command line options. | |
# savefile_directory = | |
# Save all save states (*.state) to this directory. | |
# This will be overridden by explicit command line options. | |
# savestate_directory = |
<?php | |
/** | |
* Implements hook_node_view(). | |
* | |
* Using Taxonomy Menu and you want your breadcrumbs / active trail to follow suit? | |
* This snippet will handle that so that your breadcrumbs can / might look like this: | |
* | |
* home >> term A >> subterm B >> node title | |
* | |
* How to use: |
/** | |
* Class GoogleMapAdjust | |
* | |
* Adjusts latitude & longitude coördinates by pixel offsets. | |
* | |
* This class takes a coordinate, converts it to a pixel value, calculates the | |
* offsetted value and converts back to the coordinate. | |
* | |
* Primary use case: offset the center of a Google Map canvas from a marker | |
* position on your map. This is useful if you don't want markers to be shown |
var urls = ['url', 'url2']; | |
artoo.ajaxSpider( | |
function(i) { | |
return urls[i]; | |
}, | |
{ | |
process: function(data, i) { | |
var inv = $(data).find('.classname').text(); | |
var url = urls[i]; | |
return [url, inv]; |
This gist contains a list of tricks, commands and formula I collected while working with Open Refine.
See this blogpost: Merging Datasets with Common Columns in Google Refine
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="text" /> | |
<xsl:variable name="delimiter" select="';'" /> | |
<!-- define an array containing the fields we are interested in --> | |
<xsl:variable name="fieldArray"> | |
<field>Production</field> | |
<field>object_number</field> |
var promiseCSV = require('promiseCSV.js'); | |
var path = "in.csv"; | |
var options = { 'headers': true }; | |
promiseCSV(path, options).then(function (records) { | |
// do other stuff | |
}); |
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="text" /> | |
<xsl:variable name="delimiter" select="','" /> | |
<!-- define an array containing the fields we are interested in --> | |
<xsl:variable name="fieldArray"> | |
<field>service_id</field> | |
<field>account</field> |
First install ZeroMQ itself. | |
1. sudo apt-get update | |
2. sudo apt-get install pkg-config | |
3. sudo apt-get install libzmq3-dev | |
Now install the PHP language binding. We assume PHP is running as PHP-FPM. | |
1. sudo pecl install zmq-beta |