Skip to content

Instantly share code, notes, and snippets.

@olekenneth
olekenneth / README.md
Last active December 27, 2025 19:01
How to export your org-mode and org-agenda to Apple Reminders
@olekenneth
olekenneth / uuid.js
Last active November 1, 2024 12:31
Generate password style text uuid of some sort
((groups = 0) => {
return Array.from({ length: groups }, () =>
Math.random().toString(36).substring(2, 7)
).join('-');
})(4);
// 'glj50-igpkd-46q7m-rre8r'
@olekenneth
olekenneth / snowjob.sh
Created December 15, 2023 11:11 — forked from sontek/snowjob.sh
Make your terminal snow
#!/bin/bash
LINES=$(tput lines)
COLUMNS=$(tput cols)
declare -A snowflakes
declare -A lastflakes
clear
blueprint:
name: deCONZ - Tuya TS0044 4-button scene switch
description: Automate your Tuya TS0044 4 button scene switch using deCONZ events.
domain: automation
input:
tuya_ts0044:
name: Tuya TS0044 4 button scene switch
description: Tuya TS0044 4 button scene switch to use
selector:
device:
blueprint:
name: Send actionable notifications when entering a zone for Android
description: 'Send actionable notifications, when an entity changes.
For each action, you can open an URL, an application on the device or load a lovelace
view/dashboard.
If you plan to use a lovelace view the format would be /lovelace/test where test
is replaced by your defined path in the defined view.
[
"0.9b0c2358dd1788",
"0.af22cceb1f7f28",
"0.c42039b4b4c24",
"0.ae4552e29371b",
"0.fed53f3a522fb",
"0.b78e80e1542c6",
"0.39e998bd9bca3",
"0.a5866e4b207788",
"0.598055b163265"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/epoll.h>
var testRandom = function(times, every) {
var i = 0;
var number = 0;
while(times > i) {
if (Math.floor(Math.random() * every) === (every - 1)) {
number++;
}
i++;
}