Skip to content

Instantly share code, notes, and snippets.

@HarvsG
HarvsG / match-color-temp-kelvin.yaml
Last active May 2, 2024 13:26
HA Blueprint to match color temperature of lights to the sun
blueprint:
name: Match Outside Colour Temperature Kelvin
description: When a light turns on or the sun elevation changes match the outside
colour temperature. It will apply to any bulb that supports color temperature.
It triggers whenever a bulb turns on, on sun elevation changes and every 5 minutes.
domain: automation
input:
target_lights:
name: Lights
description: The primary lights to be controlled
@bennewton999
bennewton999 / dailyNoteTemplate.txt
Last active May 23, 2024 16:12
My current Daily Note Template in Obsidian utilizing Templater and DataView Plugins
---
creation date: <% tp.file.creation_date() %>
tags: DailyNote <% tp.file.title.split('-')[0] %>
---
modification date: <%+ tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> // This doesn't currently work in front matter, hoping that gets fixed.
# <% tp.file.title %>
<< [[<% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %>]] | [[<% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>]]>>
@xhanin
xhanin / MailhogContainer.kt
Created April 1, 2021 05:29
A simple Kotlin Mailhog Test Container - allow to use mailhog to test sending emails with a real smtp server
package mailhog
/*
dependencies:
testImplementation("org.testcontainers:testcontainers:1.15.2")
testImplementation(platform("org.http4k:http4k-bom:4.3.5.4"))
testImplementation("org.http4k:http4k-core")
testImplementation("org.http4k:http4k-client-apache") {
because("mailhog http api messages access")
@kamilchm
kamilchm / shell.nix
Created September 17, 2018 12:06
React Native nix-shell
with import <nixpkgs> {};
let
jdk = openjdk;
node = nodejs-10_x;
sdk = androidenv.androidsdk {
platformVersions = [ "23" ];
abiVersions = [ "x86" ];
useGoogleAPIs = true;
useExtraSupportLibs = false;
@trongthanh
trongthanh / mojave.xml
Last active January 26, 2023 19:04
macOS Mojave dynamic background re-implement as GTK+ background slideshow. Background images are changed to reflect the time of the day.
<!-- Instructions:
- Download and unzip Mojave dynamic background here: https://files.rb.gd/mojave_dynamic.zip
- Rename the extracted folder as "mojave-background" (Excuse the trouble but I renamed it on my machine and already use that path in the XML file)
- Save this xml file next to the Mojave background files
- Fix the path to the background images below (better using absolute path)
- Lastly, either:
+ GNOME: Use gnome-tweaks tool to select this XML as wallpaper (as default wallpaper settings won't let you choose wallpaper from custom path)
+ MATE: Go to background setting (in Appearance) > Choose +Add... > make sure **All files** filter is selected at the bottom right > Then choose mojave.xml
-->
<background>
@pangyuteng
pangyuteng / example_keras.py
Created January 20, 2018 05:24
starter code for numerai with keras
#!/usr/bin/env python
import os
os.environ['CUDA_VISIBLE_DEVICES'] = ''
import pandas as pd
import numpy as np
from keras import optimizers
from keras.utils import to_categorical
from keras.models import Model
from keras.layers import Input, Dense
@rahulkrishnanfs
rahulkrishnanfs / Adding repository in Debian and Ubuntu
Last active March 14, 2023 14:08
add-apt-repository for adding repository in /etc/apt/sources.list
We can add the repository url to the /etc/apt/sources.list using add-apt-repository
$ sudo apt-get install python-software-properties ---------------> Package name
#### Package will be available in https://packages.debian.org/jessie/admin/python-software-properties
example adding the docker repository to the debian sources.list
$ sudo add-apt-repository "deb https://apt.dockerproject.org/repo debian-$(lsb_release -cs) main"
@jivoi
jivoi / offsec.md
Last active April 14, 2024 12:26
Penetrating Testing/Assessment Workflow

Penetrating Testing/Assessment Workflow & other fun infosec stuff

https://github.com/jivoi/pentest

My feeble attempt to organize (in a somewhat logical fashion) the vast amount of information, tools, resources, tip and tricks surrounding penetration testing, vulnerability assessment, and information security as a whole*

@mubix
mubix / infosec_newbie.md
Last active April 7, 2024 22:35
How to start in Infosec
@nstarke
nstarke / exploiting-jwt.js
Last active June 12, 2022 10:36
Exploiting JWT
// Original research publication:
// https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/
//
// Depdency installation command:
// npm i jsonwebtoken@0.2.0
//
// Node security advisory:
// https://nodesecurity.io/advisories/88
const jwt = require('jsonwebtoken');