Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am aliou on github.
  • I am aliou (https://keybase.io/aliou) on keybase.
  • I have a public key whose fingerprint is BAC5 8389 6FD5 BA64 18A0 F006 A0CD 2CA6 A264 57B8

To claim this, I am signing this object:

@aliou
aliou / combinations.coffee
Last active August 29, 2015 13:56
Combinations of sets.
# Get k-sized combinations of elements in a set.
#
# Usage:
# combinations(set, k)
#
# Parameters:
# set: Array of objects of any type. They are treated as unique.
# k: size of combinations to search for.
#
# Return:
@aliou
aliou / .gitignore
Last active December 29, 2015 17:29
Tsundoku
.env
node_modules/
@aliou
aliou / lastfm2dayone.js
Last active December 28, 2015 07:39
Last.fm -> Currently Playing in Day One
var _ = require('underscore');
var DayOne = require('dayone').DayOne;
var DayOneEntry = require('dayone').DayOneEntry;
var LastfmAPI = require('lastfmapi');
var moment = require('moment');
var FIVEMINUTES = 300;
var lfm = new LastfmAPI({
'api_key' : process.env.LASTFM_KEY,
var _ = require('underscore');
var DayOne = require('dayone').DayOne;
var DayOneEntry = require('dayone').DayOneEntry;
var moment = require('moment');
var journal = new DayOne();
journal.list({}, function(err, entries) {
var start = moment().startOf('day').year(2012);
var DayOne = require('dayone').DayOne;
var DayOneEntry = require('dayone').DayOneEntry;
var dayone = new DayOne();
dayone.list({'tags': ['randomidea']}, function(err, entries) {
var new_entries = entries.sort(function(a, b) {
if (a.creationDate > b.creationDate)
return 1;
if (a.creationDate < b.creationDate)
return -1;
@aliou
aliou / maplist.geojson
Created August 7, 2013 16:59
A MapList
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
* Ready Player One by Ernest Cline
* Millenium Books by Stieg Larsson
* Ender's Game by Orson Scott Ward
* Mr. Penumbra's 24-Hour Bookstore by Robin Sloan
* Jumper / Reflex / Impulse by Steven Gould
* The Dark Fields by Alan Glynn (Limitless)
* Misery by Steven King
* Carrie by Steven King
* Peplum by Amelie Nothomb
* Divergent by Veronica Roth
<?xml version="1.0" encoding="UTF-8"?>
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
<!-- always try to focus new windows when they appear. other rules do
apply -->
"1.0
highlight StatusLine -moz-appearance: none !important; font-weight: bold; background: transparent !important; border: 0px !important; min-height: 22px !important; text-shadow: none !important; font: normal 14px/1 'Inconsolata for Powerline' !important; padding: 3px 0px 3px 5px !important;
highlight CmdLine padding: 1px !important; font: normal 14px 'Inconsolata for Powerline' !important;
highlight CmdOutput font: normal 13px 'Inconsolata for Powerline' !important;
highlight CompItem font: normal 13px 'Inconsolata for Powerline' !important;
highlight Find background: #d6c149; color: #000;
set hlfind
" set defsearch=duckduckgo