Skip to content

Instantly share code, notes, and snippets.

View aldavigdis's full-sized avatar

Alda Vigdis Skarphedinsdottir aldavigdis

View GitHub Profile
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
System.AggregateException: One or more errors occurred. ---> Microsoft.NodejsTools.Npm.PackageJsonException: Error reading package.json at 'C:\Users\stefanvignir\Documents\GitHubVisualStudio\osodb-angular\node_modules\grunt-google-cdn\node_modules\bower\node_modules\rc\package.json': Error reading package.json. The file may be parseable JSON but may contain objects with duplicate properties.
The following error occurred:
Can not add Newtonsoft.Json.Linq.JValue to Newtonsoft.Json.Linq.JObject. ---> Microsoft.NodejsTools.Npm.PackageJsonException: Error reading package.json. The file may be parseable JSON but may contain objects with duplicate properties.
The following error occurred:
Can not add Newtonsoft.Json.Linq.JValue to Newtonsoft.Json.Linq.JObject. ---> System.ArgumentException: Can not add Newtonsoft.Json.Linq.JValue to Newtonsoft.Json.Linq.JObject.
at Newtonsoft.Json.Linq.JObject.ValidateToken(JToken o, JToken existing)
@aldavigdis
aldavigdis / gist:d3c1bf1eeb82c07245cb
Created August 2, 2015 15:12
List of installed KSP plugins.
$ ckan list
KSP found at /Users/stefanvignir/Library/Application Support/Steam/SteamApps/common/Kerbal Space Program
KSP Version: 1.0.4
Installed Modules:
- CapCom 1.2
- CommunityResourcePack 0.4.4