Skip to content

Instantly share code, notes, and snippets.

<?php
class BlueskyProfileBridge extends BridgeAbstract {
const NAME = 'Bluesky Profile Posts';
const URI = 'https://bsky.app';
const DESCRIPTION = 'Fetches posts from a Bluesky profile';
const MAINTAINER = 'Code modified from rsshub (TonyRL https://github.com/TonyRL) and expanded';
const PARAMETERS = [
[
'handle' => [
@eMerzh
eMerzh / configuration.yaml
Last active April 2, 2023 10:38
Rain Estimate Sensor
sensor:
- platform: rest
# find your station on https://hydrometrie.wallonie.be/home/observations/precipitation.html?mode=map&station=DGH%2F2348
# here DGH%2F2348
resource_template: https://hydrometrie.wallonie.be/services/KiWIS/KiWIS?request=getTimeseriesValues&service=kisters&type=queryServices&datasource=0&format=json&maxquality=206&forceCacheHeaderTime=300&valuesasstring=false&ts_path=DGH%2F2348%2FPrecip%2FDay.Total&metadata=false&md_returnfields=ts_id%2C%20ts_path%2C%20ts_spacing%2C%20ts_name%2C%20ts_shortname%2C%20station_no%2C%20station_id%2C%20station_latitude%2C%20station_longitude%2C%20station_name%2C%20ts_unitname%2C%20ts_unitsymbol%2C%20stationparameter_name%2C%20ca_sta&from={{ today_at("00:00").isoformat() }}&returnfields=Timestamp%2CValue
name: "Hydrometrie Lillois"
scan_interval: 1800
unit_of_measurement: "mm"
device_class: "precipitation"
value_template: "{{ value_json[0]['data'][-1][1] }}"
@eMerzh
eMerzh / SlateBody.json
Created February 18, 2022 14:24
Post Of Elium File
{
"object": "value",
"document": {
"object": "document",
"data": {
"version": 4
},
"nodes": [
{
"object": "block",
@eMerzh
eMerzh / karabiner.json
Last active October 14, 2017 09:23
Karabiner in ~/.config/karabiner/karabiner.json
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
{
"aliasColors": {},
"bars": false,
"datasource": "new influx",
"editable": true,
"error": false,
"fill": 1,
"grid": {
"threshold1": null,
"threshold1Color": "rgba(216, 200, 27, 0.27)",
@eMerzh
eMerzh / test.py
Last active October 7, 2015 14:51
# -*- coding: utf-8 -*-
from celery import Celery, group, chain, chord
app = Celery('tasks', broker='redis://localhost:6379/0', backend='redis://localhost:6379/0?new_join=1')
app.conf.CELERY_CHORD_PROPAGATE = True
@app.task
def add(x):
if(x == 3):
raise Exception('arg')
@eMerzh
eMerzh / GCAllocine.pm
Created December 28, 2013 23:18
Patch for gcstar
package GCPlugins::GCfilms::GCAllocine;
###################################################
#
# Copyright 2005-2010 Christian Jodar
#
# This file is part of GCstar.
#
# GCstar is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@eMerzh
eMerzh / urbis.sh
Created July 3, 2013 14:02
urbis stats
wget http://download.geofabrik.de/europe/belgium-latest.osm.pbf
osm2pgsql/osm2pgsql -S /home/chaos/os/default.style -s -v -x -j -U osm -d gis -H 127.0.0.1 -W belgium-latest.osm.pbf --bbox 3.981,50.645,4.761,51.053
#then sql =)
@eMerzh
eMerzh / fix.py
Last active December 18, 2015 09:19
#!/bin/jython
'''
This code is released under the WTFPL
It tries to fix Urbis osm files (missing addresses in relation )
'''
from javax.swing import JOptionPane
from org.openstreetmap.josm import Main
import org.openstreetmap.josm.command as Command
@eMerzh
eMerzh / shp2pgsql-core.c
Created May 20, 2013 17:01
Postgis Numeric : postgis-2.0.3/loader/shp2pgsql-core.c
1470,1477c1470
< void removeChar(char *str, char garbage) {
< char *src, *dst;
< for (src = dst = str; *src != '\0'; src++) {
< *dst = *src;
< if (*dst != garbage) dst++;
< }
< *dst = '\0';
< }
---