Skip to content

Instantly share code, notes, and snippets.

Damien Gaignon psolyca

  • Tours, France
Block or report user

Report or block psolyca

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@psolyca
psolyca / gitea_boltdb_bug.log
Last active Mar 21, 2017
Boltdb : broken unaligned load/store in armv5
View gitea_boltdb_bug.log
[psolyca@dockstar gitea]$ sudo -u gitea gitea web --config /var/lib/gitea/custom/conf/app.ini
2017/03/21 14:12:28 [T] Custom path: /usr/bin/custom
2017/03/21 14:12:28 [T] Log path: /var/log/gitea
panic: runtime error: index out of range
goroutine 1 [running]:
code.gitea.io/gitea/vendor/github.com/boltdb/bolt.(*Bucket).pageNode(0x12511860, 0x65000000, 0x0, 0x12522580, 0x0)
/home/psolyca/aur/gitea-git/src/src/code.gitea.io/gitea/vendor/github.com/boltdb/bolt/bucket.go:697 +0x1b0
code.gitea.io/gitea/vendor/github.com/boltdb/bolt.(*Cursor).search(0x11b47760, 0x15fd3d3, 0x1, 0x1, 0x65000000, 0x0)
/home/psolyca/aur/gitea-git/src/src/code.gitea.io/gitea/vendor/github.com/boltdb/bolt/cursor.go:254 +0x30
@psolyca
psolyca / localepurge-config
Created Apr 19, 2017
localepurge-config consistent with MINGW34 system (not MINGW32) : This script aim to provide a configuration file for localpurge
View localepurge-config
#!/bin/sh
set -e
# first get all possible locales and create a full list of locale values:
# to be deleted CONFIG_FILE="/etc/locale.nopurge"
TEMPFILE="$(mktemp --suffix ".locales")"
LOCALELIST=/var/cache/localepurge/localelist
@psolyca
psolyca / localepurge
Last active Apr 19, 2017
localepurge consistent with MINGW64 (not MINGW32) : This script aim to purge all locale files except those in /etc/locale.nopurge
View localepurge
#! /bin/bash
# Deleting all locale files and localized man pages installed
# on system which are *not* listed in /etc/locale.nopurge
set -e
NOPURGECONF=/etc/locale.nopurge
if [ "$1" = "-debug" ] || [ "$1" = "-d" ] \
|| [ "$2" = "-debug" ] || [ "$2" = "-d" ]; then
@psolyca
psolyca / locale.nopurge
Created Apr 19, 2017
locale.nopurge for MINGW systems : This file is the config file for localepurge MINGW64 system (change locales at the end)
View locale.nopurge
####################################################
# This is the configuration file for localepurge(8).
####################################################
# Comment this to enable localepurge.
# NO COMMENT IT IF YOU ARE NOT SURE WHAT ARE YOU DOING
# THIS APP DO NOT ASK FOR CONFIRMATION
#NEEDSCONFIGFIRST
####################################################
# Uncommenting this string enables removal of localized
@psolyca
psolyca / SPDT_electrodragon.md
Last active May 24, 2018
Modding Electrodragon SPDT double relay board
View SPDT_electrodragon.md

Some information about Electrodragon SPDT double relay board that is not on the wiki pages

Flashing the board

To be able to flash the board, the serial bitrate should be 9600, 57600 or 115200 baud. btn2 should be push on reset till beginning of flash (blue LED blink on the other side) after it could be released (keep it pushed till the end of flash if trouble).

Access to GPIOs

GPIO4 and GPIO5

On the main pin header, IO4 and IO5 are inverted thus IO4 is GPIO5 of ESP-12F ans IO5 is GPIO4.

@psolyca
psolyca / RollerShutter.md
Last active Jun 4, 2018
Roller shutter with Electrodragon SPDT and HLW8012
View RollerShutter.md

After modding the Electrodragon SPDT, it is time to use it.

The goal is to make a roller shutter switch. A HLW8012 breakout board (energy meter) made also by Electrodragon will be used as a calibration system to handle percentage opening.

ESPeasy is the firmware of the main board and Domoticz the home automation manager.

Hardware

For security reasons and to avoid both UP and DOWN power lines powered in the same time, one relay is the power relay where as the other one is the direction relay.

Following the modding of the SPDT board:

@psolyca
psolyca / LightsControl.md
Last active Jun 4, 2018
Light control with NodeMCU v3
View LightsControl.md

The goal is to control all my lights with Domoticz and my wall switches.

A NodeMCU v3 will be used as the controller, a PCF8574 board to extand I/O, a 4 relays board to switch lights on/off and a mini AC-DC converter.

ESPeasy is the firmware of the main board and Domoticz the home automation manager.

Home configuration

Lights in the home are simple or 3-way switches. By the way, all cables from live, neutral and between switches and lights are gathered in a connecting box as the following: wiring_present

@psolyca
psolyca / video_bitrates_multiplicator_table_live.txt
Last active Nov 6, 2018
Video bitrates multiplicator table for live for Yi4k
View video_bitrates_multiplicator_table_live.txt
The values in the video bitrate table are stored as 32 bit floating point values :
0x3D4CCCCD #0.05
0x3DCCCCCD #0.1
0x3E19999A #0.15
0x3E4CCCCD #0.2
0x3E800000 #0.25
0x3E99999A #0.3
0x3EB33333 #0.35
0x3ECCCCCD #0.4
@psolyca
psolyca / video_bitrates_base_table_live.txt
Created Nov 6, 2018
Video bitrates base table for live for Yi4k
View video_bitrates_base_table_live.txt
0x49742400 #1.00 Mbps
0x49927C00 #1.20 Mbps
0x49989680 #1.25 Mbps
0x49B71B00 #1.50 Mbps
0x49D59F80 #1.75 Mbps
0x49F42400 #2.00 Mbps
@psolyca
psolyca / autoexec_preset_res.ash
Last active Nov 15, 2018
4 presets for live streaming through Yi 4k
View autoexec_preset_res.ash
# All multiplicators are the same for example purpose
# Change them to suit your needs with
# https://gist.github.com/psolyca/722b9b9e32e6c66e29f9b4c5788ea50f to choose a base bitrate
# https://gist.github.com/psolyca/57a4025b0bba5216db728e1054c04a2d to choose bitrate multiplicators
# https://gist.github.com/psolyca/d83bd3594c94c6e3fd17d7ae636678ff to choose a resolution and the number associate
# Resolution depend on the choice between NTSC and PAL on the cam.
# Following resolutions are NTSC format.
# Only one base multiplicator for all presets
You can’t perform that action at this time.