Skip to content

Instantly share code, notes, and snippets.

@seasox
seasox / wake-up-light-alarm-with-sunrise-effect.yaml
Last active November 28, 2023 10:44 — forked from sbyx/wake-up-light-alarm-with-sunrise-effect.yaml
Home Assistant Blueprint: Wake-up light alarm with sunrise effect
blueprint:
name: Wake-up light alarm with sunrise effect
description: 'A wake-up light alarm with a brightness and color temperature sunrise
effect. Note: Requires date_time_iso sensor in configuration, not manually executable!'
domain: automation
input:
light_entity:
name: Wake-up light entity
description: The light to control. Turning it off during the sunrise will keep
it off. Color temperature range is auto-detected.
@seasox
seasox / bis.md
Last active January 23, 2021 11:51 — forked from brandonsturgeon/bis.md
World of Warcraft 3.3.5a Warmane Complete PvE BiS (Best In Slot) List (db.rising-gods.de Links)
@seasox
seasox / rsa.py
Last active November 19, 2020 08:58
RSA Key Recovery
#!/usr/bin/env python3
p0 = int("""
908184469103574984795932265928358354638054796
66217317017699423700239659749759815002441863307634
99150890684320005999042526897004097380363781161708
80775006330512846700651037295237503225333489046629
82319494212743792747685757003399230261027519567689
38470257948129097699067032084002260996647823433544
0662981624111
""".replace("\n", ""))
@seasox
seasox / colibriwp-serialization-fix.php
Created November 4, 2020 23:47 — forked from kemenaran/colibriwp-serialization-fix.php
Script to fix ColibriWP serialization errors
<?php
/**
* Plugin Name: ColibriWP Fix Options
*
*/
function fix_str_length($matches) {
$string = $matches[2];
$right_length = strlen($string); // yes, strlen even for UTF-8 characters, PHP wants the mem size, not the char count
@seasox
seasox / R.diff
Created June 27, 2018 10:02
R.diff
$ diff R.generated.swift R.working.generated.swift
758c758
< static let showBarcodeScannerList: Rswift.StoryboardSegueIdentifier<CenterContainmentSegue, App.SideMenuControllerSplitter, UIKit.UINavigationController> = Rswift.StoryboardSegueIdentifier(identifier: "ShowBarcodeScannerList")
---
> static let showBarcodeScannerList: Rswift.StoryboardSegueIdentifier<SideMenuController.CenterContainmentSegue, App.SideMenuControllerSplitter, UIKit.UINavigationController> = Rswift.StoryboardSegueIdentifier(identifier: "ShowBarcodeScannerList")
760c760
< static let showContact: Rswift.StoryboardSegueIdentifier<CenterContainmentSegue, App.SideMenuControllerSplitter, UIKit.UINavigationController> = Rswift.StoryboardSegueIdentifier(identifier: "ShowContact")
---
> static let showContact: Rswift.StoryboardSegueIdentifier<SideMenuController.CenterContainmentSegue, App.SideMenuControllerSplitter, UIKit.UINavigationController> = Rswift.StoryboardSegueIdentifier(identifier: "ShowContact")
762c762
@seasox
seasox / AndroidManifest.xml
Last active March 6, 2017 14:12
Parceler magically wraps non-annotated list items
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.example.parcelertest">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"