Skip to content

Instantly share code, notes, and snippets.

@getflourish
getflourish / devex_news_lab.md
Last active May 23, 2016 17:07 — forked from dsager/devex_news_lab.md
The Devex NewsLab: Using Google Docs as a CMS

The Devex NewsLab: Using Google Docs as a CMS

Note: This post was originally published on the Devex Tech Blog

This article describes our current content management solution and gives some insight on the parts of the implementation we think are interesting.

As you might know a big part of our website is dedicated to News content covering various aspects of international development. At Devex we usually publish around 10 articles per day which are sometimes planned and worked on several days or even weeks in advance. There are different people involved in the process including both internal and external writers, editors, researchers or marketing folks. Some of them contribute to the article's content while others just need to be aware what is going on to coordinate their own work like social media campaigns.

@getflourish
getflourish / plugin.js
Last active April 12, 2016 01:22
Find & Replace Fonts in Sketch
// define the scope for the search/replace
var artboard = context.document.currentPage().currentArtboard();
var layers = artboard.children();
// this method will list all font names that are used in the scope
function listFontNames() {
import geomerative.*;
import org.apache.batik.svggen.font.table.*;
import org.apache.batik.svggen.font.*;
RFont font;
RGroup grp;
RPoint[] points;
void setup () {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script src="../node_modules/babel/dist/browser.js"></script>
<script src="../dist/es6-module-loader-dev.js"></script>
@getflourish
getflourish / icon.xml
Created August 12, 2015 20:03
Grouped icon, artboard export
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs></defs>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g stroke="#566483" stroke-width="2">
<g transform="translate(4.000000, 4.000000)">
<circle cx="12" cy="12" r="12"></circle>
<path d="M6,12 L18,12" stroke-linecap="square"></path>
<path d="M12,6 L12,18" stroke-linecap="square"></path>
</g>
@getflourish
getflourish / icon.xml
Created August 12, 2015 20:02
Slice on canvas, padded
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs></defs>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<circle stroke="#566483" stroke-width="2" cx="16" cy="16" r="12"></circle>
<path d="M10,16 L22,16" stroke="#566483" stroke-width="2" stroke-linecap="square"></path>
<path d="M16,10 L16,22" stroke="#566483" stroke-width="2" stroke-linecap="square"></path>
</g>
</svg>
@getflourish
getflourish / icon.xml
Last active August 29, 2015 14:27
SVG, exported group from artboard with offset
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs></defs>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g stroke="#566483" stroke-width="2">
<g transform="(translate(4.000000, 4.000000)">
<circle cx="12" cy="12" r="12"></circle>
<path d="M6,12 L18,12" stroke-linecap="square"></path>
<path d="M12,6 L12,18" stroke-linecap="square"></path>
</g>
@getflourish
getflourish / icon.xml
Created August 12, 2015 10:23
SVG, skipped Ids
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs></defs>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<circle stroke="#566483" stroke-width="2" cx="12" cy="12" r="12"></circle>
<path d="M6,12 L18,12" stroke="#566483" stroke-width="2" stroke-linecap="square"></path>
<path d="M12,6 L12,18" stroke="#566483" stroke-width="2" stroke-linecap="square"></path>
</g>
</svg>
@getflourish
getflourish / icon.xml
Created August 12, 2015 10:21
SVG, compact
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<circle id="circle" stroke="#566483" stroke-width="2" cx="12" cy="12" r="12"></circle>
<path d="M6,12 L18,12" id="line-b" stroke="#566483" stroke-width="2" stroke-linecap="square"></path>
<path d="M12,6 L12,18" id="line-a" stroke="#566483" stroke-width="2" stroke-linecap="square"></path>
</g>
</svg>
@getflourish
getflourish / icon.xml
Last active August 29, 2015 14:27
SVG default
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12072) - http://www.bohemiancoding.com/sketch -->
<title>Icon</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<circle id="circle" stroke="#566483" stroke-width="2" sketch:type="MSShapeGroup" cx="12" cy="12" r="12"></circle>
<path d="M6,12 L18,12" id="line-b" stroke="#566483" stroke-width="2" stroke-linecap="square" sketch:type="MSShapeGroup"></path>
<path d="M12,6 L12,18" id="line-a" stroke="#566483" stroke-width="2" stroke-linecap="square" sketch:type="MSShapeGroup"></path>