Title: MultiMarkdown guide
Author: Tim van Werkhoven
Email: [email protected]
Date: 20121224
CSS: /Users/tim/.mdqlstyle.css
URL: https://gist.github.com/4473492
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# Topic: Using RouterOS to VLAN your network | |
# Example: Router-Switch-AP all in one device | |
# Web: https://forum.mikrotik.com/viewtopic.php?t=143620 | |
# RouterOS: 6.43.12 | |
# Date: Mar 28, 2019 | |
# Notes: Start with a reset (/system reset-configuration) | |
# Thanks: mkx, sindy | |
############################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: High sensor value notification | |
description: Notify users of high sensor values (e.g. CO2, temp, PM2.5), and again when value drops below acceptable level | |
domain: automation | |
input: | |
trigger_sensor: | |
name: Trigger sensor | |
description: E.g. CO2, PM2.5, temperature | |
selector: | |
entity: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TvW fork: also report energy used | |
blueprint: | |
name: Appliance has finished+ | |
description: Do something when an appliance (like a washing machine or dishwasher) | |
has finished as detected by a power sensor, and show power consumption. | |
domain: automation | |
input: | |
power_sensor: | |
name: Power Sensor | |
description: 'Power sensor entity (e.g. from a smart plug device).' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# | |
# # About | |
# | |
# Since APFS supports de-duplication on block-level, it can be useful to | |
# manually de-duplicate your files if you've migrated/upgrade to APFS not | |
# using a fresh install. | |
# | |
# I've written this simple script with the aim to: | |
# - Be simple, easy to read and understand (for users to check) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# spotify-kodi startup script | |
# | |
# Start spotify, wait for display, start kodi, bring kodi window into focus (again) | |
# | |
# # USAGE | |
# 1. Install somewhere (e.g. /snap/bin/) | |
# 2. Run as startup item on Linux | |
# | |
# # ABOUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Implementation and of K Means Clustering | |
Requires : python 2.7.x, Numpy 1.7.1+''' | |
import numpy as np | |
def kMeans(X, K, maxIters = 10, plot_progress = None): | |
centroids = X[np.random.choice(np.arange(len(X)), K)] | |
for i in range(maxIters): | |
# Cluster Assignment step | |
C = np.array([np.argmin([np.dot(x_i-y_k, x_i-y_k) for y_k in centroids]) for x_i in X]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Whatsapp log parser for pisg, made by Tim van Werkhoven | |
# Features: parses logs, detects subject changes | |
# Known issues: only works without images, does not filter out 'image omitted' texts | |
# Use Charset = "utf-8" in config file to enable emoji | |
package Pisg::Parser::Format::whatsapp; | |
use strict; | |
$^W = 1; | |
sub new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script backups an OS X system to an external volume, effectively | |
# cloning it. It is based on [0], [1] and [2] for OS X and [3] and [4] for | |
# Linux. One could also use commercial tools like SuperDuper! or Carbon Copy | |
# Cloner. The latter website has an interesting list[5] on what files to | |
# exclude when cloning. | |
# | |
# Exclusions (from CCC[5]), see rsync_excludes_osx.txt | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"Framboos": [["C", "Spanje"], ["E", "Mexico"]], "Nectarine": [["B", "Chili"]], "Limoen": [["A", "Brazili\u00eb"]], "Avocado": [["B", "Isra\u00ebl"], ["C", "Chili"], ["C", "Spanje"]], "Wortelen (breekpeen/waspeen)": [["A", "Nederland"]], "Carambola": [["D", "Isra\u00ebl"], ["E", "Maleisi\u00eb"]], "Radijs (los)": [["B", "Nederland"]], "Sperzieboon": [["B", "Marokko"], ["B", "Spanje"], ["C", "Senegal"], ["D", "Egypte"], ["E", "Kenia"]], "Kokosnoot": [["C", "Ivoorkust"], ["C", "Sri Lanka"], ["D", "Algerije"]], "Broccoli": [["B", "Frankrijk"], ["B", "Spanje"]], "Witte kool": [["A", "Nederland"]], "Lychee": [["C", "Madagaskar"], ["C", "Zuid-Afrika"]], "Rabarber": [["C", "Nederland"]], "Asperge (groen)": [["E", "Peru"]], "Courgette": [["A", "Spanje"]], "Rode biet": [["A", "Nederland"]], "Andijvie (gewoon)": [["A", "Spanje"], ["E", "Nederland"]], "Spitskool": [["A", "Nederland"], ["A", "Spanje"], ["B", "Portugal"]], "Ananas": [["B", "Costa Rica"], ["B", "Ecuador"]], "Kersen": [["E", "Chili"]], "Artisjok": [["B", "S |
NewerOlder