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
@zoilomora
zoilomora / README.md
Last active April 15, 2025 01:56
How to disable cloud-init in Ubuntu

How to disable cloud-init in Ubuntu

Prevent start

  • Create an empty file to prevent the service from starting

      sudo touch /etc/cloud/cloud-init.disabled
    

Uninstall

@alexishida
alexishida / rtsp-intelbras-outros.txt
Last active April 17, 2025 15:50
RTSP dvr intelbras e outros para acesso direto home assistant
-------- DVR e Mibo Smart Intelbras -------------------------------------------------------
rtsp://usuário:senha@ip:porta/cam/realmonitor?channel=1&subtype=0
Ps minha mibo smart im4c só funcionou com esse link:
rtsp://admin:chave de acesso@ip:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
-------- Luxvision -------------------------------------------------------
rtsp://ip:porta/user=[usuário]&password=[senha]&channel=1&stream=0.sdp
@Davidaredding
Davidaredding / RedisToKestral.cs
Created January 15, 2019 06:11
Simple REDIS to Websocket via Kestral and C#
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using StackExchange.Redis;
using System;
using System.Net.WebSockets;
using System.Threading;
using System.Threading.Tasks;
@canabady
canabady / Linking Parent-Component-FormGroup-with-Child-Component-FormControlName
Last active May 24, 2023 00:15
Connecting parent component 'formGroup' with child component 'formControlName'
Connecting parent component 'formGroup' with child component 'formControlName'
In the Parent component template
================================
<form [formGroup]="recipeForm">
<app-recipe-name [parent]="recipeForm"></app-recipe-name>
</form>
@dlsniper
dlsniper / cross-compile-go.bash
Created October 13, 2017 21:45
Cross compile Go for Raspberry Pi 3
cd ~
git clone [email protected]:golang/go.git gotip
cd gotip/src
export GOROOT_BOOTSTRAP=/usr/local/go
env GOOS=linux GOARCH=arm GOARM=7 ./make.bash
@netstart
netstart / app.module.ts
Last active February 28, 2023 21:16
Forçar que o Angular utilize o locale pt-BR em uma aplicação.
// https://github.com/angular/angular-cli/issues/6683
import { NgModule, LOCALE_ID } from '@angular/core';
// force to use locale pt-BR
providers: [ {provide: LOCALE_ID, useValue: 'pt-BR' } ]
// Or use below line to get locale from browser
// providers: [ {provide: LOCALE_ID, useValue: window.navigator.language} ]
@kwikwag
kwikwag / build.bat
Created August 22, 2017 22:54
Windows build batch file for Live555, based on instructions by @nspool
@rem Place this file at the live/ directory of the downloaded LIVE555 source files.
@rem Based on instructions at https://nspool.github.io/2016/02/building-live555/
@rem Tested with Visual Studio 2015 on Windows 10
@echo off
if exist "%TEMP%\sed.vbs" goto skip_gen_sed
> "%TEMP%\sed.vbs" (
REM thanks to https://stackoverflow.com/questions/127318/is-there-any-sed-like-utility-for-cmd-exe
@echo.Dim pat, patparts, rxp, inp
@echo.pat = WScript.Arguments(0^)
@RangelReale
RangelReale / gist:3e6392289d8ba1a52b6e70cdd7e10282
Last active June 22, 2024 23:08
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"
@dublado
dublado / gist:f584cdd895eb6db0b74c199d532d2ac8
Created May 25, 2017 21:33
Nomes das Tabelas do Protheus/TOTVS
Nomes das Tabelas
SX1 Manutenção de Perguntas de parametrização (movimentações, consultas e relatórios)
SX2 Manutenção dos Arquivos
SX3 Manutenção dos Campos
SX4 Configuração de Agenda de Relatórios e Processos
SX5 Manutenção de Tabelas
SX6 Manutenção de Parâmetros
SX7 Manutenção de Gatilhos de Campos (SX3)
SX9 Manutenção de Relacionamento entre Arquivos (SX2)
SXA Manutenção de Pastas Cadastrais dos Arquivos (SX2)
@mustafaturan
mustafaturan / network-tweak.md
Last active March 27, 2025 17:28
Linux Network Tweak for 2 million web socket connections

Sample config for 2 million web socket connection

    sysctl -w fs.file-max=12000500
    sysctl -w fs.nr_open=20000500
    # Set the maximum number of open file descriptors
    ulimit -n 20000000

    # Set the memory size for TCP with minimum, default and maximum thresholds 
 sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'