Skip to content

Instantly share code, notes, and snippets.

View arantes555's full-sized avatar

Mehdi K arantes555

  • OVHcloud
  • Paris, France
View GitHub Profile
@arantes555
arantes555 / SealdAcceleratorModule.kt
Created December 18, 2024 14:53
SymKey in Kotlin
package io.seald.teststreams_rn
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.ReactContextBaseJavaModule
import com.facebook.react.bridge.ReactMethod
import com.facebook.react.bridge.Promise
import android.util.Log
import android.net.Uri
import android.os.Environment
@arantes555
arantes555 / tempo.yml
Last active December 9, 2024 09:43
EDF tempo sensors
rest:
- resource_template: "https://www.api-couleur-tempo.fr/api/joursTempo?dateJour%5B%5D={{now().strftime('%Y-%m-%d')}}&dateJour%5B%5D={{(now() + timedelta(days=1)).strftime('%Y-%m-%d')}}"
scan_interval: 3600
headers:
Accept: application/json
sensor:
- name: "edfTempo"
value_template: "{{ 'unknown' if not value_json[0] else 'bleu' if value_json[0].codeJour == 1 else 'blanc' if value_json[0].codeJour == 2 else 'rouge' if value_json[0].codeJour == 3 else 'unknown' }}"
availability: 'unknown'
- name: "edfTempoTomorrow"
@arantes555
arantes555 / Info-framework.plist
Last active May 2, 2023 14:29
GoLang build xcframework
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>##FRAMEWORK_NAME##</string>
<key>CFBundleIdentifier</key>
<string>##FRAMEWORK_ID##</string>
@arantes555
arantes555 / rw_mutex_group.go
Last active November 21, 2022 10:33
RWMutexGroup
package utils
import "sync"
type RWMutexGroup struct {
internalMap map[string]*sync.RWMutex
internalMapLock sync.RWMutex
globalLock sync.RWMutex
}
@arantes555
arantes555 / __init__.py
Last active October 29, 2021 14:11
HA generic_thermostat_with_step
"""The generic_thermostat_with_step component."""
DOMAIN = "generic_thermostat_with_step"
PLATFORMS = ["climate"]
@arantes555
arantes555 / index.html
Last active January 9, 2018 10:32
js-untar bug with accents
<!DOCTYPE html>
<html>
<header>
<script type='text/javascript' src="./untar.js"></script>
<script type='text/javascript' src="./index.js"></script>
</header>
<body>
<div>
Choose a file to seal:
<br>