Skip to content

Instantly share code, notes, and snippets.

@sjaakvandenberg
sjaakvandenberg / automatic_light_brightness.yaml
Last active August 5, 2023 08:06 — forked from haberda/periodic_lights_XY.yaml
Automatic light brightness
# Originally from https://gist.github.com/haberda/a43a40d8b2e734036b1575e1e6df7a59
blueprint:
name: Time-based light dimming
description: "Dim lights progressively throughout the evening. This is indexed to the midpoint between sunset and sunrise and fit to a sin function, so the midpoint will be minimum brightness and midpoint +12hr will be maximum brightness. The midpoint can be offset by a fixed amount if lights are too dim or bright at the desired time."
domain: automation
source_url: https://gist.github.com/sjaakvandenberg/7880c3da95c334f045285a21bbf2ed7c
input:
light:
name: Light(s)
description: The light(s) to control
@sjaakvandenberg
sjaakvandenberg / lets split build guide.md
Created January 27, 2017 11:49 — forked from nicinabox/lets split build guide.md
This guide covers building a Let's Split v2.

An Overly Verbose Guide to Building a Let's Split Keyboard

This guide covers building a Let's Split v2. Order your parts and read over this guide while you wait.

  • I2C isn't covered in this guide (yet), mostly because I didn't do it for my build.
  • Flashing isn't covered. I'm hoping to add this to the QMK Let's Split readme instead.

Helpful references

@sjaakvandenberg
sjaakvandenberg / install-docker-exp.sh
Created July 17, 2016 18:36 — forked from valentin2105/install-docker-exp.sh
Install Docker on Ubuntu 16.04 x64
# Install Docker on Ubuntu 14.04.4 x64
# Ref https://docs.docker.com/engine/installation/linux/ubuntulinux/
# No interactive for now.
export DEBIAN_FRONTEND=noninteractive
# Update your APT package index.
sudo apt-get -y update
# Update package information, ensure that APT works with the https method, and that CA certificates are installed.
sudo apt-get install apt-transport-https ca-certificates
# Add the new GPG key.
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Original Version: 1.4, 2016-01-16
# Tweaked based on personal preferences for @alirobe 2016-03-23 - v1.4.1
# NOTE: MAKE SURE YOU READ THIS SCRIPT CAREFULLY BEFORE RUNNING IT + ADJUST COMMENTING AS APPROPRIATE
# This script will reboot your machine when completed.
##########
# Ask for elevated permissions if required
@sjaakvandenberg
sjaakvandenberg / .bashrc
Created May 5, 2016 09:18 — forked from groks/.bashrc
fancy bash prompt with colors, trimmed CWD and git status
# Shows exit status in red if previous command exited with
# an error code, the CWD in blue up to 30 chars or the 3 parent
# directories, and the git branch and status in grey, if in a
# git repo.
PS1="\n[\u@\h \[\e[1;31m\]\$(_exit_status)\[\e[0m\]\[\e[0;36m\]\$(_short_dir \w)\[\e[0m\]\[\e[1;30m\]\$(_git_status)\[\e[0m\]]\\$ "
# Return the exit status with padding if exit status != success
_exit_status() {
exit_status=$?
@sjaakvandenberg
sjaakvandenberg / docker-compose-coreos.sh
Created April 27, 2016 16:26 — forked from sourcec0de/docker-compose-coreos.sh
Install docker compose on coreos
sudo su -
mkdir -p /opt/bin
curl -L https://github.com/docker/compose/releases/download/1.5.1/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose
@sjaakvandenberg
sjaakvandenberg / basic.md
Created September 14, 2015 07:26
Cleaver Presentation Markdown

title: Presentation Title theme: dark controls: false output: dark/index.html

-- center

Presentation Title

Lorem ipsum subtitle dolor sit amet

@sjaakvandenberg
sjaakvandenberg / keybase.md
Created August 3, 2015 15:39
Keybase Proof

Keybase proof

I hereby claim:

  • I am sjaakvandenberg on github.
  • I am svdb (https://keybase.io/svdb) on keybase.
  • I have a public key whose fingerprint is F5F5 C015 160B 70AE 5FD0 0C12 13DB CAA1 2633 81A7

To claim this, I am signing this object:

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).