Skip to content

Instantly share code, notes, and snippets.

View luizfernandonb's full-sized avatar

Luiz luizfernandonb

  • Bezerros, Pernambuco
  • 22:39 (UTC -03:00)
View GitHub Profile
@joulgs
joulgs / terminal.txt
Last active April 28, 2024 17:42
How install libssl1.1 on ubuntu 22.04
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
@DiegoFleitas
DiegoFleitas / commands.txt
Last active January 17, 2024 01:53
youtube-dl (yt-dlp) useful commands
# download first 31 videos from playlist as mp3 ignoring errors
ty-dlp -i --playlist-start 31 --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" "https://www.youtube.com/playlist?list=PLzIUZKHPb1HbRFdPjNMxsnwngP27R5rk6"
# download first 3 videos from playlist ignoring errors
ty-dlp -i --playlist-end 3 -o "%(title)s.%(ext)s" "https://www.youtube.com/playlist?list=PLzIUZKHPb1HbRFdPjNMxsnwngP27R5rk6"
# backup channel
ty-dlp -f bestvmuideo+bestaudio/best --download-archive archive.txt --merge-output-format mkv -i --all-subs --embed-subs --add-metadata --write-annotations --write-info-json --write-thumbnail --write-description -o "%(uploader)s/%(title)s %(id)s.%(ext)s" --yes-playlist https://www.youtube.com/channel/UCh7zWwSV3xPPzxViCbjJnaQ
# list playlist videos data as json
@mmozeiko
mmozeiko / tls_client.c
Last active March 26, 2024 02:27
simple example of TLS socket client using win32 schannel api
#define WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#include <windows.h>
#define SECURITY_WIN32
#include <security.h>
#include <schannel.h>
#include <shlwapi.h>
#include <assert.h>
#include <stdio.h>
@rlaphoenix
rlaphoenix / shr-build.md
Last active September 1, 2023 14:26
Simpsons Hit & Run SRC Compiling

Simpsons Hit & Run SRC Compiling

TODO: Cleanup, improve, support other platforms and such.

  • All information in this is a community effort and I do not take credit for any of it.
  • SHA256: EA72121D29CE40EBD9F6B5BA2E337CEE02B812BB07ED67797F37E382FE075A85
  • Ensure the full path of the src has absolutely no spaces or characters that would need escaping.

Compiling for PC with the original VS 2002 Solution

@chponte
chponte / gnu-toolchain.md
Last active March 13, 2024 20:44
Building a complete GNU toolchain, comprised of binutils + gcc + glibc
@richlander
richlander / modernizing-csharp9.md
Last active April 26, 2024 17:14
Modernizing a codebase for C# 9

Modernizing a codebase for C# 9

There are lots of cases that you can improve. The examples use nullable reference types, but only the WhenNotNull example requires it.

Use the property pattern to replace IsNullorEmpty

Consider adopting the new property pattern, wherever you use IsNullOrEmpty.

string? hello = "hello world";
@ishad0w
ishad0w / sources.list
Created April 30, 2020 16:55
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
@weshouman
weshouman / 1-simple.mk
Last active February 20, 2024 18:16
Makefile function example
PATH = /tmp/
define myfn
processed_input=${PATH}/$(2)
$(1) := $$(processed_input)
endef
mytarget:
$(eval FILE=myfile)
$(eval $(call myfn,abs_filename,$(FILE)))
@Arzio
Arzio / build.gradle
Last active October 4, 2022 17:54
Fix Forge 1.7.10 HTTPS error during Gradle operations
// The comments with [HTTPS FIX] tag refers to the parts that fixes the issue.
buildscript {
repositories {
// [HTTPS FIX] Replace mavenCentral() with the code block below
maven {
url "https://repo1.maven.org/maven2"
}
@mashingan
mashingan / simplest_player.c
Created December 17, 2019 14:05
Simplest example of creating player using FFMpeg and SDL2. Currently with choppy audio playing.
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <time.h>
#include <windows.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
//#include <libavutil/frame.h>
#include <SDL2/SDL.h>