Skip to content

Instantly share code, notes, and snippets.

@Raukze
Raukze / contact-sensor-left-open-notification.yaml
Last active January 16, 2025 08:37
Home Assistant Blueprint: Contact Sensor Left Open Notification
blueprint:
name: 🚪 Contact Sensor Left Open Notification by Malte
description: |
📲 Notifies you when a door or window is left open.
🚀 Version 2024.04.23.1
Are you tired of worrying about open doors or windows? This blueprint has got you covered! It's designed to send you a prompt notification when a door or window remains open for a specified duration.
📖 For Details see this [Blog post](https://community.home-assistant.io/t/contact-sensor-door-or-window-left-open-notification/652571)
@TuxSH
TuxSH / k11_latest_n3ds.cpp
Last active January 16, 2025 08:37
Complete 3DS kernel decompilation (11.14-latest N3DS Kernel11, with labels for all symbols, and comments)
This file has been truncated, but you can view the full file.
/* This file was generated by the Hex-Rays decompiler.
Copyright (c) 2007-2020 Hex-Rays <[email protected]>
Detected compiler: GNU C++
*/
#include <defs.h>
@Islomov49
Islomov49 / DecimalAmountTransformation.kt
Last active January 16, 2025 08:36
Decimal Amount Visual Transformation - Jetpack compose Visual Transformation for decimal input. Cursor works well! There might be room for optimization
package io.untec.utils.masks
import android.util.Log
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.TextRange
import androidx.compose.ui.text.input.OffsetMapping
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.text.input.TransformedText
import androidx.compose.ui.text.input.VisualTransformation
import java.math.BigDecimal
@obrhoff
obrhoff / gist:fd619d5526dbb3ef5211aebd2a5ce23f
Created July 6, 2024 17:15
Build Opus Audio Codec for iOS
#!/bin/bash
VERSION="1.5.2"
SDKVERSION="17.0"
MINIOSVERSION="10.0"
###########################################################################
#
# Don't change anything under this line!
#
@adrianhajdin
adrianhajdin / constants.index.ts
Created October 13, 2023 10:54
Build and Deploy a Fully Responsive Modern UI/UX Website | React.js, Next.js 13, Tailwind CSS
// NAVIGATION
export const NAV_LINKS = [
{ href: '/', key: 'home', label: 'Home' },
{ href: '/', key: 'how_hilink_work', label: 'How Hilink Work?' },
{ href: '/', key: 'services', label: 'Services' },
{ href: '/', key: 'pricing ', label: 'Pricing ' },
{ href: '/', key: 'contact_us', label: 'Contact Us' },
];
// CAMP SECTION
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active January 16, 2025 08:26
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@andres-erbsen
andres-erbsen / gist:1307745
Created October 23, 2011 19:15
Bash script to install firefox extension xpi (for all users by default)
#!/bin/bash
EXTENSIONSDIR="/usr/lib/firefox-addons/extensions"
TMP="/tmp/firefox-extension-install-temp"
[ x"$1" == "x" ] || [ ! -f $1 ] && echo "Specify valid .xpi file as argument." && exit 1
sudo rm -rf $TMP 2>/dev/null
mkdir -p "$TMP"
trap "sudo rm -rf $TMP 2>/dev/null" 1 2 3 15
@jocopa3
jocopa3 / CommandRequest.js
Created February 11, 2017 18:46
MCPE/Win10 WebSocket JSON Messages
// For more information about available commands, look at the commands/standard.json file in the game's assets.
{
"body": {
"input": {}, // Command inputs go here
"origin": {
"type": "player" // Where the command originates from
},
"name": "name-of-command", // Command name goes here (i.e. for /say, enter "say")
"version": 1,
@vinoski
vinoski / sws.erl
Last active January 12, 2024 14:59
An example of a very simple HTTP 1.0 web server in Erlang.
%% Simple web server.
-module(sws).
-author('Steve Vinoski <[email protected]>').
-export([start/1, start/2]).
%% start/1 takes a handler function and starts the web server on port 8000.
%% start/2 takes a handler function and a port number. The handler function
%% takes two arguments: a TCP socket and request data. The request data is
%% a property list indicating the invoked HTTP method, the target URI, the
@kinu
kinu / how_i_got_into_google.md
Last active January 16, 2025 08:17
Google に入るまでの話

Google に入ったときの話 (Kinuko)

祭っぽいので私も書いてみることにした!お手軽に gist で。

コンテキスト:https://togetter.com/li/1331865

対策とか(特になし)

と書き出したはいいが、私が受けたときは本も情報もあまりなく、かつ競プロ的なものの存在も知らなかったので、とりあえず家にあったアルゴリズムの本を2回くらい読み直した。そして受かった。最初っから情報があまりない方のパターンで申し訳ない 😄