Skip to content

Instantly share code, notes, and snippets.

GET /
#### 1ST PART CRUD
DELETE villas
# Create the first doc
PUT villas/_doc/yorkshire
{
"message": "This is Yorkshire"
}
@emanuil-tolev
emanuil-tolev / git-find-big.sh
Created March 6, 2017 15:13
git-find-big.sh
#!/bin/bash
#set -x
# download this to the root of your problem repo, chmod +x it, then run it from the root of the problem repo
# Shows you the largest objects in your repo's pack file.
# Written for osx.
#
# @see http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# @author Antony Stubbs
@emanuil-tolev
emanuil-tolev / gist:4caeba3e5b599a0faa762ba55b4dc66d
Created June 21, 2016 08:28
OACWellcome XML licence translations
{'CC': 'cc', # I think this one should not be used since we do not have a "cc" licence, it's too ambiguous
'CC BY': 'cc-by',
'CC BY NC': 'cc-by-nc',
'CC BY NC ND': 'cc-by-nc-nd',
'CC BY NC SA': 'cc-by-nc-sa',
'CC BY NC-ND': 'cc-by-nc-nd',
'CC BY NC-SA': 'cc-by-nc-sa',
'CC BY ND': 'cc-by-nd',
'CC BY SA': 'cc-by-sa',
'CC BY-NC': 'cc-by-nc',
@emanuil-tolev
emanuil-tolev / gist:0c97eaa9c0e7bfd09e93
Created February 23, 2016 10:23
An informed opinion on UK leaving the EU
In case you're on the edge regarding the UK's referendum on staying or leaving the EU, here's one informed opinion.
Do note that people will have wildly differing opinions on the reasons for the current challenges facing the EU (at the end). This does not invalidate the rest of the (apparently) accurate information below.
* * *
What did the EU ever do for us?
Not much, apart from: providing 57% of our trade;
structural funding to areas hit by industrial decline;
clean beaches and rivers;
cleaner air;
@emanuil-tolev
emanuil-tolev / gist:1fb5c93f9848e4f709b7
Created August 3, 2015 14:48
Running pip with conflicting requirements
Obtaining file:///home/emanuil/cl/doaj/src/doaj (from -r requirements.txt (line 11))
Running setup.py (path:/home/emanuil/cl/doaj/src/doaj/setup.py) egg_info for package from file:///home/emanuil/cl/doaj/src/doaj
running egg_info
writing dependency_links to doaj.egg-info/dependency_links.txt
writing requirements to doaj.egg-info/requires.txt
writing doaj.egg-info/PKG-INFO
writing top-level names to doaj.egg-info/top_level.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'doaj.egg-info/SOURCES.txt'
@emanuil-tolev
emanuil-tolev / opendata-pub-reccomendations.bg.md
Created June 23, 2012 13:23 — forked from peio/opendata-pub-reccomendations.bg.md
Технически преопоръки за публикуване на отворени правителствени данни

Технически преопоръки за публикуване на отворени правителствени данни

Формати

Най-бързият и лесен начин да се направят определени данни достъпни онлайн е да се публикуват в суровия "изходен" формат (примерно XML файловете с имотните декларации на лицата, заемащи висши държавни длъжности). Важно е данните да бъдат добре структурирани. Структурата позволява автоматизирания достъп и обработка на данните. Добре познати и разпространени формати за структуриране на данни са XML, RDF и CSV. Файлови формати, които позволяват на данните да бъдат видяни, без да бъдат извлечени и обработени (примерно изображения на документи), не са използваеми и следва да бъдат избягвани.

Каталог

Създайте онлайн каталог на достъпните данни, който да позволи на хората лесно да откриват достъпната информация. Данните следва да бъдат добре описани и документирани, защото в противен случай тяхната използваемост би била минимална. Популярните методи за съхранение в Excel, Word, PDF и други двоични формати следва да бъдат избягва