Skip to content

Instantly share code, notes, and snippets.


Daniel Schildt d2s

View GitHub Profile
d2s /
Last active Oct 15, 2020
Installing Node.js to Linux & macOS & WSL with nvm

Installing Node.js with nvm to Linux & macOS & WSL

A quick guide on how to setup Node.js development environment.

Install nvm for managing Node.js versions

nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.

  1. Open new Terminal window.

Fix Ubuntu package cache

Had problem with Ubuntu package cache.

➜  sources.list.d sudo apt-get update                   
Hit:1 xenial InRelease
Hit:2 xenial-updates InRelease                                                                   
Hit:3 xenial-backports InRelease                                                                 
Hit:4 xenial-security InRelease
d2s /
Last active Sep 14, 2020
Installing Go with command line

NOTE: This is heavily outdated Gist snippet from 2017.

Install Go language with a Bash script

Another alternative to installing Go is to use a simple Bash script. It will download and install Go language under of your own user account.

Note that a system-wide installation might be better for some things

d2s / content.html
Created Jan 5, 2011
Clickable div overlay
View content.html
<div class="project img_project1">
<div class="link-div">
<object type="img/gif">
<a class="lightbox" href="">
<img src="/images/spacer.gif" alt="" width="100%" height="100%" />
<h5>Project 1</h5>
<p>Description of the project.</p>
d2s /
Last active Feb 4, 2020
Bash / Zsh aliases for macOS WiFi configuration management
# -----------------------------------------------------------
# Network configuration metadata
# -
# -----------------------------------------------------------
alias macos-wifi-configuration="defaults read /Library/Preferences/SystemConfiguration/"
alias macos-wifi-configuration-backup="macos-wifi-configuration > ~/Desktop/macos-wifi-configuration-backup-$(date +%F-%H%M).txt"
alias macos-wifi-grep-ssid="macos-wifi-configuration | grep wifi.ssid | tr -d \"[:blank:]\" | sort | uniq"
alias macos-wifi-grep-SSIDString="macos-wifi-configuration | grep SSIDString | tr -d \"[:blank:]\" | sort | uniq"
alias macos-wifi-network-names="macos-wifi-grep-SSIDString"
d2s /
Created Jun 20, 2019
Pull changes from an upstream Git repository
#!/usr/bin/env bash
# Add `upstream` Git repository
# git remote add upstream
# Merge latest changes from the `upstream` Git repository
git fetch upstream
git checkout master
git merge upstream/master
d2s / index.html
Created Sep 12, 2019
Kokonaisarvio datan hyötypotentiaalista (Heat Map with Plotly.js)
View index.html
<!-- Plotly.js -->
<script src=""></script>
<h1>Heat Map with Plotly.js</h1>
d2s /
Last active Jun 20, 2019
Working with 3rd party Git repositories

Working with 3rd party repositories

Pull changes from upstream

Steps to pull changes from an upstream repository.

Add upstream Git repository

git remote add upstream
d2s /
Last active Mar 8, 2019
Tips on how to learn Docker

Good starting point for learning Docker is to read following sections from the official Docker documentation. It is mainly a series of short tutorials, together with related documentation about syntax of commands, etc..

Those are focusing mainly on how to get existing things from Docker Hub. Next thing to learn would be how to create things for running custom software on top of base Ubuntu Linux system image.

d2s / afp.conf
Last active May 6, 2018 — forked from dinigo/afp.conf
Install netatalk (afp) in Ubuntu with service announcing and provide a Time Machine share. Users must belong to `timemachine` group to be allowed to use it.
View afp.conf
path = /store/time-machine
time machine = yes
valid users = @timemachine
You can’t perform that action at this time.