Skip to content

Instantly share code, notes, and snippets.

View aldavigdis's full-sized avatar

Alda Vigdis Skarphedinsdottir aldavigdis

View GitHub Profile
@aldavigdis
aldavigdis / add_iceland_to_vat_countries.php
Last active December 5, 2025 11:22
Add Iceland to the WooCommerce list of countries that use VAT
<?php
declare(strict_types = 1);
/*
Add Iceland to the WooCommerce list of countries that use VAT
A PR has been sent over to the WooCommerce codebase, at
https://github.com/woocommerce/woocommerce/pull/62126 but it
is unlikely to result in any concrete results and has not been
@aldavigdis
aldavigdis / phpcs.xml
Last active September 13, 2025 21:28
Alda Vigdis' PHPCS Configuration for WordPress Plugins
<?xml version="1.0"?>
<!--
# Alda Vigdis' PHPCS Configuration for WordPress Plugins
A PHPCS Configuration for WordPress plugins, assuming the use of PSR-4
autoloading and Imposter.
The mainline WordPress coding standard is meant for use with WordPress itself
and projects that may end up being included in the WordPress Core. When making
your own plugins or themes using modern development methods and practices that
server {
listen 8080 default_server;
root /var/www/html;
index index.html index.php index.nginx-debian.html;
server_name _;
location / {
try_files $uri $uri/ =404;
}
@aldavigdis
aldavigdis / falsehoods.md
Last active March 3, 2023 09:00
Falsehoods programmers belive about location data

Being inspired by Falsehoods Programmers Believe About Names, I wrote down this list of falsehoods programmers belive about locations and addresses.

Using an external API

  • Information from the Google Maps API is always correct and up to date.
  • At least there is a single, correct location database that I can use.

Basic validation and formatting

  • Every location has an English name.
@aldavigdis
aldavigdis / gist:5d7af541230140ba5b86d3bb2e04685e
Last active September 19, 2022 13:08
What do I want in a job?

What do I want in a Job?

Environment

  • Everyone, including the C-level uses, knows the etiquette of and is active on a group chat platform such as Slack
  • I will work with people in a single time zone or a limited number of adjacent time zones (i.e. no insistance on me being available at 10 am Central European Time and also end-of-day at US-West Time for instance)
  • A sufficient coworking space stipend for a "fixed desk" and amenities
  • A Berlin office with my team in it or a sufficient travel budget to meet my team or induvidiual coworkers and stake holders in person regularly
  • The daily commute can include my gym without an unreasonable detour
  • There is a safe place to keep my bike, preferably next to my desk
<?php
class DonnaPix {
const PIC_IPSUM_URL = 'https://picsum.photos/';
public function __construct() {
add_filter(
'wp_calculate_image_srcset',
array( $this, 'srcset_filter' ),
10,
1
@aldavigdis
aldavigdis / runasdo.sh
Last active September 4, 2020 14:11
Run a command as the owner of the current directory
#!/bin/bash
if [[ -z "$RUNAS" ]]; then
runas=$(stat -c '%U' .)
else
runas=$RUNAS
fi
if [[ $runas == 'root' ]]; then
if [[ -z $( command -v cowsay ) ]]; then
@aldavigdis
aldavigdis / example.js
Created August 11, 2018 19:54
Refreshing datepicker
<DayPickerSingleDateController
key={ 'datepicker-controller-' + momentDate.format( 'MM-YYYY' ) }
onDateChange={ onChangeMoment }
focused={ momentDate }
date={ momentDate }
numberOfMonths={ 1 }
transitionDuration={ 0 }
/>
Til þess er málið varðar,
Ég bý og starfa erlendis en hef íslenska viðskiptavini sem greiða mér reikninga í EUR inn á þýskan bankareikning í gegn um SWIFT. Millifærslur hafa undantekningarlaust tekið 5 virka daga á meðan reglur um greiðslur innan SEPA taka það skýrt fram að greiðsla skuli berast á reikning innan tímamarka, sem er næsti bankadagur í landi viðtakanda. Viðskiptin eiga sér öll uppruna hjá viðskiptavinum Arion-banka.
Nú eru allar upplýsingar sem ég finn um greiðslur í EUR milli SEPA-landa mjög skýrar varðandi það að greiðslur skuli berast viðskiptabanka viðtakanda eigi síðar en næsta bankadag svo lengi sem greiðslan er í EUR. — Ég veit ekki betur en að ESB-reglugerð nr. 260/2012, sem og tengt regluverk varðandi SEPA hafi tekið gildi á Íslandi.
Tek það fram að minn þýski viðskiptabanki (N26 Bank) segist ekki tefja greiðslur mv. mín samskipti við hann og að greiðslubunkar séu afgreiddir inn á reikninga viðskiptavina á tveggja klukkustunda fresti frá 8 að morgni.
Varðandi þær tafir sem ég hef orð

Welcome to /r/Iceland! — We are a community of locals and expats alike discussing news, politics, culture and Icelandic life in general.


r/Iceland er stuðningshópur Íslendinga á reddit; félagsskapur karla og kvenna sem samhæfa reynslu sína, styrk og vonir svo að þau megi leysa sameiginlegt vandamál sitt og séu fær um að hjálpa öðrum frá því böli sem fylgir þjóðerninu. Höfuðtilgangur okkar er að þrauka og að styðja aðra Íslendinga til hins sama.

House Rules

  1. Tourism-related content is generally not accepted
  2. No racism, xenophobia, discrimination or bullying