Skip to content

Instantly share code, notes, and snippets.

@hekmon
hekmon / README.md
Last active May 19, 2024 11:47
EDF Tarif Bleu prices within Home Assistant

Simply include the file within your configuration.yaml file like this:

# ...
input_number: !include input_numbers.yaml
# ...

Restart your Home Assistant to update the values (reloading YAML will not be enough).

@Minionguyjpro
Minionguyjpro / Activate_Windows_8_8.1_10_and_11_Pro_for_Free.md
Last active May 19, 2024 11:42
Activate Windows 8, 8.1, 10 and 11 Pro for Free

Activate Windows 8, 8.1, 10 and 11 Pro for Free

A guide how to get and activate Windows 8, 8.1, 10 and 11 Pro for free!

NOTE

If you see the Windows keyboard button in this guide; and you can't find it on your keyboard, you likely have/had Windows 10 which has the button . If you can't find that one, you likely have a PC that has been upgraded to Windows 8/8.1/10/11 from Windows 8.1/8/7/Vista/XP and other ones. If you have one of those, refer the Windows key button to as yours. A list of them is below:

Windows key buttons

- Windows 11

- Windows 10

@justinvanwinkle
justinvanwinkle / broken.py
Last active May 19, 2024 11:45
Every python rate-limiting library (that I can find) is broken, at least a little.
# I was looking for a rate limiting library to call rate limited apis as closely
# as possible to their enforced limits. I looked at the first few python libraries
# that I found, and when I glanced at the source, they were all clearly broken.
# Curious how this could be, I took all the top google and pip search results for: python rate limiting
# and tried to get them to do the wrong thing and fail to rate limit in situations that could come up
# in normal use (though in some cases very specific use)
# https://github.com/tomasbasham/ratelimit
# Where broken:
@PowerKiKi
PowerKiKi / generate-wildcard-certificate.sh
Created December 4, 2015 07:31
Generate self-signed wildcard SSL certificate for development environment
#!/usr/bin/env bash
# print usage
DOMAIN=$1
if [ -z "$1" ]; then
echo "USAGE: $0 domain.lan"
echo ""
echo "This will generate a non-secure self-signed wildcard certificate for given domain."
echo "This should only be used in a development environment."
@Arno0x
Arno0x / TestAssembly.cs
Last active May 19, 2024 11:37
This code shows how to load a CLR in an unmanaged process, then load an assembly from memory (not from a file) and execute a method
/*
================================ Compile as a .Net DLL ==============================
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /target:library /out:TestAssembly.dll TestAssembly.cs
*/
using System.Windows.Forms;
namespace TestNamespace
const todayYear = new Date().getFullYear()
mainLoop: for (let year = todayYear; year > todayYear - 100; year--) {
for (let month = 1; month <= 12; month++) {
for (let day = 1; day <= 31; day++) {
const passphrase = `${year.toString().slice(-2)}${month.toString().padStart(2, '0')}${day.toString().padStart(2, '0')}`
try {
const isDecryptionSuccessful = decryptAndReplaceHtml(passphrase)
if (!isDecryptionSuccessful) throw new Error('Decryption failed')
console.log(`SUCC ${passphrase}`)
break mainLoop
@thomd
thomd / LC_COLORS.md
Last active May 19, 2024 11:36
LSCOLORS & LS_COLORS

alternatively use: http://geoff.greer.fm/lscolors/

LSCOLORS

The value of this variable describes what color to use for which attribute when colors are enabled with CLICOLOR. This string is a concatenation of pairs of the format fb, where f is the foreground color and b is the background color.

The color designators are as follows:

a black

@dhh
dhh / linux-setup.sh
Last active May 19, 2024 11:35
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl btop \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@marharyta
marharyta / yahoo.css
Created December 9, 2018 18:19
Yahoo Reset CSS
/**
* YUI 3.5.0 - reset.css (http://developer.yahoo.com/yui/3/cssreset/)
* https://cssreset.com/
* Copyright 2012 Yahoo! Inc. All rights reserved.
* http://yuilibrary.com/license/
*/
/*
TODO will need to remove settings on HTML since we can't namespace it.
TODO with the prefix, should I group by selector or property for weight savings?
*/
@foeken
foeken / gist:2118d85319a6beca4e743157ab80861a
Created May 19, 2024 09:11
auto-tagging co-workers prompt
- Replace all co-workers from this list with their tagged entity. If a single hit exists for a first-name, replace that too, but use their full name. Replace "me" with [[André Foeken^C3E282iICP]].
- If there are multiple options, do not replace. ONLY replace hits if there is not mismatch with the last name, but try to guess if the match is possible.
- NEVER use a codeblock (```) in the output
- List of co-workers:
- All co-workers
- Input:
- Me and Peter van Soolingen wrote a song
- Output:
- [[André Foeken^C3E282iICP]] and [Peter van Soolingen^4DbyNvwGfd]] wrote a song
- Input: