Skip to content

Instantly share code, notes, and snippets.

View d2s's full-sized avatar

Daniel Schildt d2s

View GitHub Profile
@d2s
d2s / installing-node-with-nvm.md
Last active March 13, 2024 12:09
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.
@d2s
d2s / readme.md
Last active January 13, 2024 01:54
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 https://github.com/d2s/companies.git
@d2s
d2s / install-spell-checker-to-vs-code.md
Last active September 20, 2023 09:57
Installing spell checker to VS Code

Spelling Checker for Visual Studio Code

  • README of the code-spell-checker VS Code extension.

Installing spell checker to VS Code

  • Open up VS Code
  • Press button F1
  • Type ext install code-spell-checker to the command promnt and press Enter key.
@d2s
d2s / install-go-to-with-bash-script.md
Last active May 10, 2023 22:45
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
d2s / css-notes.md
Created December 29, 2022 18:54
Default stylesheets of web browsers

CSS-related notes

Default stylesheets of web browsers

@d2s
d2s / docker-basics.md
Last active October 9, 2022 00:15
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
d2s / _reduced-motion.scss
Created October 5, 2022 19:46
Reduced motion for people who prefer not to see animations and transitions.
// Remove all animations and transitions
// for people who prefer not to see them
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
@d2s
d2s / content.html
Created January 5, 2011 20:29
Clickable div overlay
<div class="project img_project1">
<div class="link-div">
<object type="img/gif">
<a class="lightbox" href="http://example.com/">
<img src="/images/spacer.gif" alt="" width="100%" height="100%" />
</a>
</object>
</div>
<h5>Project 1</h5>
<p>Description of the project.</p>
@d2s
d2s / feed-json.njk
Created May 19, 2022 11:11
JSON Feed template for Eleventy site generator
---json
{
"permalink": "/feed.json",
"eleventyExcludeFromCollections": true
}
---
{
"version": "https://jsonfeed.org/version/1",
"title": "{{ config.name }}",
"home_page_url": "{{ config.url }}",

Fix Ubuntu package cache

Had problem with Ubuntu package cache.

➜  sources.list.d sudo apt-get update                   
Hit:1 http://fi.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://fi.archive.ubuntu.com/ubuntu xenial-updates InRelease                                                                   
Hit:3 http://fi.archive.ubuntu.com/ubuntu xenial-backports InRelease                                                                 
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease