Skip to content

Instantly share code, notes, and snippets.

pierwill

Block or report user

Report or block pierwill

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pierwill
pierwill / terminal-notifier.el
Last active Nov 15, 2018 — forked from justinhj/gist:eb2d354d06631076566f
Sending a notification from emacs
View terminal-notifier.el
;; requires terminal-notifier
;; (☞ brew install terminal-notifiter)
(defvar terminal-notifier-command (executable-find "terminal-notifier") "The path to terminal-notifier.")
(defun terminal-notify (title message)
"Send an OS X notification.
Arguments are the notfication TITLE and MESSAGE.
@pierwill
pierwill / SIPRI-arms-transfer.md
Last active Dec 11, 2017 — forked from jsvine/SIPRI-arms-transfer.md
How to download SIPRI arms transfer data as a CSV file instead of a rich-text file.
View SIPRI-arms-transfer.md

The Stockholm International Peace Research Institute's Arms Transfers Database provides a tool to download the data. By default, that output is an .rtf rich-text file — not so easy to analyze with your favorite spreadsheet or statistics software. Luckily, getting a CSV of the data isn't very difficult. Here's how.

To get all transfers for 2016, by seller, run this command in your terminal:

curl http://armstrade.sipri.org/armstrade/html/export_trade_register.php --compressed \
    --data 'low_year=2016' \
    --data 'high_year=2016' \
    --data 'seller_country_code=' \
    --data 'buyer_country_code=' \
You can’t perform that action at this time.