Skip to content

Instantly share code, notes, and snippets.

View felixtriller's full-sized avatar
🏠
Working from home

Felix Triller felixtriller

🏠
Working from home
View GitHub Profile
@JerryWorkman
JerryWorkman / building-home-assistant-js-websocket.md
Last active June 10, 2022 17:22
Home Assistant Dashboard using WebSocket API

Building home-assistant-js-websocket

Easy way:

Use this CDN (from the author @balloob)

<script src='https://cdn.jsdelivr.net/npm/home-assistant-js-websocket@1.1.2/dist/haws.umd.min.js'></script>

Do not use:

@squidpickles
squidpickles / README.md
Last active January 31, 2024 12:48
Multi-platform (amd64 and arm) Kubernetes cluster

Multiplatform (amd64 and arm) Kubernetes cluster setup

The official guide for setting up Kubernetes using kubeadm works well for clusters of one architecture. But, the main problem that crops up is the kube-proxy image defaults to the architecture of the master node (where kubeadm was run in the first place).

This causes issues when arm nodes join the cluster, as they will try to execute the amd64 version of kube-proxy, and will fail.

It turns out that the pod running kube-proxy is configured using a DaemonSet. With a small edit to the configuration, it's possible to create multiple DaemonSets—one for each architecture.

Steps

Follow the instructions at https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/ for setting up the master node. I've been using Weave Net as the network plugin; it see

@AhmedElSharkasy
AhmedElSharkasy / best_practices
Last active April 8, 2019 14:53
Rails 3 AntiPatterns, Useful snippets and Recommended Refactoring. Note: Some of them are collected from different online resources/posts/blogs with some tweaks.
Rails as it has never been before :)
Rails 3 AntiPatterns, Useful snippets and Recommended Refactoring.
Note: Some of them are collected from different online resources/posts/blogs with some tweaks.
@aarongustafson
aarongustafson / responsive-iframes.css
Created October 25, 2011 17:07
Responsive iFrames with jQuery
iframe {
max-width: 100%;
}

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables