Skip to content

Instantly share code, notes, and snippets.

View hgouveia's full-sized avatar

Jose De Gouveia hgouveia

View GitHub Profile
@jdah
jdah / network_demo.c
Created January 31, 2024 14:22
the world's most basic client/server
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
static void server() {
// create socket
#!/bin/bash
# Flush IPtables rules
iptables -F
# Ensure default deny firewall policy
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
@danielmacuare
danielmacuare / python3.md
Last active July 5, 2021 05:38
To Install ANY python version on Linux boxes

Python - Building from source (Updated Dec 2020)

The following commands will help you to install Python 3.9.1 on a Centos 7 or Ubuntu 18.04 machine.

1 - Select the Python version you'll install.

https://www.python.org/ftp/python/ - We'll select the latest version as of Dec 2020 (3.9.1)

2 - Installing Python.

On Centos 7

sudo yum install gcc openssl-devel bzip2-devel libffi-devel
@dhgouveia2
dhgouveia2 / Vagrantfile
Last active March 27, 2024 18:41
Kube 3cluster lab - vmware_desktop provider
Vagrant.configure("2") do |config|
#VM settings
config.vm.provider "vmware_desktop" do |v|
v.vmx["memsize"] = "2048"
v.vmx["numvcpus"] = "2"
end
config.vm.box = "bento/ubuntu-22.04"
@doctaphred
doctaphred / ntfs-filenames.txt
Last active May 9, 2024 13:27
Invalid characters for Windows filenames
Information from https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file :
Use any character in the current code page for a name, including Unicode
characters and characters in the extended character set (128–255), except
for the following:
- The following reserved characters:
< (less than)
> (greater than)
@Brainiarc7
Brainiarc7 / ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
Last active April 21, 2024 04:22
ffmpeg livestreaming to youtube via Nvidia's NVENC and Intel's VAAPI on supported hardware

Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:

Considerations to take when live streaming:

The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:

  1. Set the buffer size (-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode.

  2. Set up the encoders as shown:

@cjtallman
cjtallman / README.md
Last active February 24, 2024 01:12
Vagrant Gitlab Server

Vagrant Gitlab Server

Quickly set up a local Gitlab CE server using Vagrant.

Run vagrant up to setup the virtual server.

Server Details

  • Ubuntu 16.04
  • Installs latest Docker
@xCONFLiCTiONx
xCONFLiCTiONx / Notepad2.ini
Last active May 18, 2023 13:55
Notepad2 VSCode Dark Theme (import)
##above is your settings##
[Custom Colors]
01=#000000
02=#0A246A
03=#3A6EA5
04=#52A5F8
05=#0D8206
06=#608020
07=#648000
08=#A46000
anonymous
anonymous / config.json
Created November 20, 2015 23:01
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@amochohan
amochohan / 01_Laravel 5 Simple ACL manager_Readme.md
Last active April 22, 2024 17:19
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php