Skip to content

Instantly share code, notes, and snippets.

View daleffe's full-sized avatar
💭
I may be slow to respond.

Guilherme Roberge Daleffe daleffe

💭
I may be slow to respond.
View GitHub Profile
@daleffe
daleffe / private_fork.md
Last active July 5, 2023 22:30 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git new-repo-name

@daleffe
daleffe / ionic-sockets.md
Created December 7, 2022 22:50
Sockets for Ionic Cordova

Any way to help with a ionic 4/5 integration using this... I am struggling to get the var declare Socket:any setup to work in Ionic 4/5

Hi @Burnie777, i will reproduce some parts of code of production app that works to help you.

  1. The socket service

Here we created a service with following content, transforming the Cordova events in Observables:

import { Injectable } from '@angular/core';
@daleffe
daleffe / events.ts
Last active January 24, 2024 12:24 — forked from sagrawal31/events.ts
Alternative to Events which got removed in Ionic 5+
import { Injectable } from '@angular/core';
import { Subject, Subscription } from 'rxjs';
/**
* A custom Events service just like Ionic 3 Events https://ionicframework.com/docs/v3/api/util/Events/ which got removed in Ionic 5.
*
* @author Shashank Agrawal
* @author Guilherme Roberge Daleffe
*/
@Injectable({ providedIn: 'root' })
@daleffe
daleffe / virtual_network.md
Created March 31, 2022 11:06 — forked from maddes-b/virtual_network.md
Virtual Network Interface Card (NIC) with systemd on Debian 9 "Stretch"

systemd.network allows to create virtual network interface cards in different ways. The common type is MACVLAN where the virtual NIC has its own MAC address, which allows to assign separate IP addresses via DHCP/RA.

  1. Switch away from old /etc/network stuff to systemd. If you have special manual settings then adapt them to systemd.network
systemctl enable systemd-networkd.service
systemctl disable networking.service
systemctl status networking.service systemd-networkd.service
systemctl start systemd-networkd.service
systemctl stop systemd-networkd.service
@daleffe
daleffe / hashes.txt
Created October 6, 2019 23:05
Hashes
which produce (long hashes are cropped)
md2 32 a9046c73e00331af68917d3804f70655
md4 32 866437cb7a794bce2b727acc0362ee27
md5 32 5d41402abc4b2a76b9719d911017c592
sha1 40 aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
sha256 64 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e730
sha384 96 59e1748777448c69de6b800d7a33bbfb9ff1b463e44354c3553
sha512 128 9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2d
ripemd128 32 789d569f08ed7055e94b4289a4195012
@daleffe
daleffe / ffmpeg-vlc.txt
Created October 1, 2019 14:38
FFMPEG failed to load stream from RTSP VLC Server
https://trac.ffmpeg.org/ticket/1941
It looks like FFmpeg incorrectly parses the SDP information in case of MPEG-2 transport stream.
When payload type is 33, it uses the Session control url instead of the Media control url in RTSP SETUP request.
a=control:rtsp://..:8554/
vs
a=control:rtsp://..:8554/trackID=0
I was able to receive the stream with the following fix:
@daleffe
daleffe / compile-ffmpeg-windows.txt
Created October 1, 2019 14:30 — forked from RangelReale/gist:3e6392289d8ba1a52b6e70cdd7e10282
How to compile ffmpeg + x264 using Visual Studio 2015
##### How to compile ffmpeg + x264 using Visual Studio 2015 #####
##### Building this way will make the DLLs compatible with SEH, so there will be no need to use /SAFESEH:NO when compiling your code #####
##### SOURCES:
### https://pracucci.com/compile-ffmpeg-on-windows-with-visual-studio-compiler.html
### https://gist.github.com/sailfish009/8d6761474f87c074703e187a2bc90bbc
### http://roxlu.com/2016/057/compiling-x264-on-windows-with-msvc
* Download "MSYS2 x86_64" from "http://msys2.github.io" and install into "C:\workspace\windows\msys64"