Skip to content

Instantly share code, notes, and snippets.

View d2s's full-sized avatar

Daniel Schildt d2s

View GitHub Profile
@d2s
d2s / afp.conf
Last active May 6, 2018 10:57 — 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.
[TimeMachine]
path = /store/time-machine
time machine = yes
valid users = @timemachine
@d2s
d2s / index.html
Created September 12, 2019 23:20
Kokonaisarvio datan hyötypotentiaalista (Heat Map with Plotly.js)
<head>
<!-- Plotly.js -->
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</head>
<body>
<header>
<h1>Heat Map with Plotly.js</h1>
</header>
@d2s
d2s / pull-changes-from-upstream.sh
Created June 20, 2019 18:56
Pull changes from an upstream Git repository
#!/usr/bin/env bash
# Add `upstream` Git repository
# git remote add upstream https://github.com/d2s/companies.git
# Merge latest changes from the `upstream` Git repository
git fetch upstream
git checkout master
git merge upstream/master
@d2s
d2s / macos-wifi-aliases.sh
Last active February 4, 2020 21:31
Bash / Zsh aliases for macOS WiFi configuration management
# -----------------------------------------------------------
# Network configuration metadata
#
# - https://github.com/drduh/macOS-Security-and-Privacy-Guide#wi-fi
# -----------------------------------------------------------
alias macos-wifi-configuration="defaults read /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist"
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"

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
@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 }}",
@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 / _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 / 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 / css-notes.md
Created December 29, 2022 18:54
Default stylesheets of web browsers

CSS-related notes

Default stylesheets of web browsers