Skip to content

Instantly share code, notes, and snippets.

View XdoctorwhoZ's full-sized avatar

Xavier RODRIGUEZ XdoctorwhoZ

  • ELSYS Design
  • France, Île-de-France
View GitHub Profile
@XdoctorwhoZ
XdoctorwhoZ / simple_doc_webserver.sh
Created January 19, 2023 06:45
simple_doc_webserver
docker run --rm --name doc_server -v $PWD:/usr/share/nginx/html:ro -p 8080:80 nginx
@XdoctorwhoZ
XdoctorwhoZ / git_ssh_windows.md
Last active March 29, 2023 08:00
Windows configure the correct ssh command

In windows you sometime need to set the correct ssh command

# To debug
git config core.sshCommand "ssh -vvv"

# To set a new ssg binary
$ git config --global core.sshCommand
C:/Windows/System32/OpenSSH/ssh.exe
@XdoctorwhoZ
XdoctorwhoZ / twitch_ffmpeg.sh
Created December 4, 2022 08:08
To start a stream on twitch with ffmpeg
# =========================================================
# Input resolution
# INRES="320x200"
INRES="640x360"
# INRES="1920x1080"
# =========================================================
# Output resolution
# OUTRES="320x200"
OUTRES="640x360"
# OUTRES="1920x1080"
# ~/.gitconfig
 
[includeIf “gitdir:~/personal/”] # include for all .git projects under personnal/ 
path = ~/personal/.gitconfig-pers
 
[includeIf “gitdir:~/work/”]
path = ~/work/.gitconfig-work
@XdoctorwhoZ
XdoctorwhoZ / stream-cvlc
Last active September 10, 2022 10:28
Stream webcam from vlc
# Simple ASCII stream on console
# cvlc -vvv v4l2:///dev/video0
cvlc -vvv v4l2:///dev/video0:chroma=mp2v --v4l2-width 1280 --v4l2-height 720 --sout '#transcode{vcodec=mp2v,acodec=mpga,fps=50}:rtp{mux=ts,sdp=rtsp://:8888/live.sdp}'
# stream can be read at => rtsp://192.168.1.4:8888/live.sdp
@XdoctorwhoZ
XdoctorwhoZ / FT232H_for_JTAG.md
Last active August 27, 2022 17:24
FT232H for JTAG

FT232H Pins used in an MPSSE

  • 13 : TCK/SK
  • 14 : TDI/DI
  • 15 : TDO/DO
  • 16 : TMS/CS

On the Adafruit FT232H Breakout / CJMCU (clone)

@XdoctorwhoZ
XdoctorwhoZ / jtag_reminder.md
Last active August 27, 2022 16:44
Reminder for JTAG practical information

Test Access Port (TAP) Controller

A JTAG compliant IC has a Test Access Port (TAP) controller that comprises of the four signals and the logic that connects and controls them.

The JTAG chip has four mandatory wires or pins and an optional fifth one for a reset signal. The required pins and roles are:

  • TDI: serial input pin for the instructions, test, and programming data
  • TDO: serial out pin for the instructions, test, and programming data
  • TMS: input for the signal that manages the TAP controller state machine.
  • TCK: clock signal input pin for the boundary scan circuitry
@XdoctorwhoZ
XdoctorwhoZ / udev_reminder.md
Created August 27, 2022 11:33
Reminder for tricks around udev

Udev Reminder

Reminder for tricks around udev 😎

If you need more information check here:

Reload UDEV Rules and restart device triggering

Use this command to reload the udev rules and restart a device detection.

@XdoctorwhoZ
XdoctorwhoZ / sqrt_light.md
Last active August 27, 2022 17:27
Sqrt without math.h

SQRT C No Math.h

/* Subformula used in sqrt computation */
float subformula(float X, float k)
{
   return (X + k/X)/2.0f;
}

/**
@XdoctorwhoZ
XdoctorwhoZ / log10.md
Last active August 27, 2022 17:28
Log10 without math.h