Skip to content

Instantly share code, notes, and snippets.

@polarblau
polarblau / gist:8f96785b82335dc6ee36f47e648de5a1
Last active September 17, 2023 19:48
Download IKEA shopping cart as CSV
var productList = document.querySelector(
'[data-testid="product_list_product_group_items"]'
);
var products = productList.querySelectorAll("[class^='product_product']");
const sizeRegex = /(\d+)x(\d+) cm/;
const delimiter = ";";
const headers = [
"Article Nr.",
"Name",
@polarblau
polarblau / install_pg_gem.sh
Created April 26, 2020 14:34
Installing the pg gem when using the postgres.app
# No pg_config... trying anyway. If building fails, please try again with
# --with-pg-config=/path/to/pg_config
gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/[YOUR postgres.app VERSION]/bin/pg_config
'use strict';
/** Base class for generic event handling.
* @example
*
* // Don’t forget to call `super()` if defining a constructor.
* class Foo extends Eventable {}
* let foo = new Foo();
*
* foo.on('bar', (data) => console.log(data));
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.axis path,
@polarblau
polarblau / work_days_2016.md
Created January 14, 2016 11:35
Work days / Berlin, Germany (2016)
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Days: 20 21 21 21 20 22 21 23 22 20 22 21
Hours: 150 157,5 157,5 157,5 150 165 157,5 172,5 165 150 165 157,5

(Hours calculations are based on 7.5 hour days.)

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

@polarblau
polarblau / amzn_wish_list_transfer.rb
Last active March 17, 2021 13:16
Transferring Amazon wish list entries the hard way between international stores.
#!/usr/bin/env ruby
require "rubygems"
require "mechanize"
SOURCE_LOGIN_URL = "https://www.amazon.com/ap/signin?_encoding=UTF8&openid.assoc_handle=usflex&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&openid.pape.max_auth_age=0&openid.return_to=https%3A%2F%2Fwww.amazon.com%2Fgp%2Fcss%2Fhomepage.html%3Fie%3DUTF8%26*Version*%3D1%26*entries*%3D0%26ref_%3Dnav_signin"
TARGET_LOGIN_URL = "https://www.amazon.de/ap/signin?_encoding=UTF8&openid.assoc_handle=deflex&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2F
@polarblau
polarblau / grid_utils.sass
Created October 3, 2015 20:49
Grid utilities, based on bourbon/neat.
// Settings
$grid-visual-aid-breakpoints: () !global !default
$grid-media-default-feature : min-width !default
$grid-max-columns : 12 !default
$grid-default-columns : 2 !default
$grid-float-direction : left !default
$grid-gutter-width : 30px !default
$grid-max-width : 1200px !default
// Scoped
#!/bin/bash
HOST="some-host.com"
ERROR_MESSAGE="Some Host server unreachable!"
while true
do
status=$(curl -s -I $HOST | grep HTTP/1.1 | awk {'print $2'})
timestamp=$(date +"%Y-%m-%d %H:%M:%S")
@polarblau
polarblau / install_pg_with_config.sh
Created May 13, 2015 08:10
Installing PG gem with postgres.app
gem install pg -- --with-pg_config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config