Skip to content

Instantly share code, notes, and snippets.

@haggholm
haggholm / unisex.js
Last active September 17, 2015 20:29
Quick script to get unisex names from behindthename.com
// E.g. http://www.behindthename.com/top/lists/united-states-decade/1980/1000
var gTable = $('body > div.body-wrapper > div > center > table > tbody > tr > td:nth-child(3) > table');
var bTable = $('body > div.body-wrapper > div > center > table > tbody > tr > td:nth-child(1) > table');
var bNames = bTable.find('td > a[href^="/name/"]').map(function(idx, el) { return $(el).text(); }).toArray();
var gNames = gTable.find('td > a[href^="/name/"]').map(function(idx, el) { return $(el).text(); }).toArray();
var uniNames = bNames.filter(function(n) {
@haggholm
haggholm / Sched.hs
Created September 8, 2015 06:19
File causing problem
module Sched (
everyNth
) where
import Data.Either
import Data.Time.Calendar
everyNth :: Int -> Either WeekDay Int -> Day -> [Day]
everyNth n tp start = case tp of
WeekDay -> start : everyNth tp (addDays n start)
@haggholm
haggholm / idea.log
Created September 8, 2015 06:16
HaskForce idea.log
2015-09-07 22:32:43,218 [ 59650] ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA 14.1.4 Build #IC-141.1532.4
2015-09-07 22:32:43,218 [ 59650] ERROR - llij.ide.plugins.PluginManager - JDK: 1.7.0_79
2015-09-07 22:32:43,218 [ 59650] ERROR - llij.ide.plugins.PluginManager - VM: OpenJDK 64-Bit Server VM
2015-09-07 22:32:43,219 [ 59651] ERROR - llij.ide.plugins.PluginManager - Vendor: Oracle Corporation
2015-09-07 22:32:43,219 [ 59651] ERROR - llij.ide.plugins.PluginManager - OS: Linux
2015-09-07 22:32:43,219 [ 59651] ERROR - llij.ide.plugins.PluginManager - Last Action: EditorBackSpace
2015-09-07 22:32:43,224 [ 59656] ERROR - llij.ide.plugins.PluginManager - chars sequence.length:295, start:295, end:0
java.lang.IndexOutOfBoundsException: chars sequence.length:295, start:295, end:0
at com.intellij.util.text.CharSequenceSubSequence.<init>(CharSequenceSubSequence.java:32)
at com.intellij.util.text.ImmutableText.subSequence(ImmutableText.java:227)