Skip to content

Instantly share code, notes, and snippets.

View caio-vinicius's full-sized avatar
🚤
42

Caio Souza | csouza-f caio-vinicius

🚤
42
View GitHub Profile
#include <mlx.h>
typedef struct s_data {
void *img;
char *addr;
int bits_per_pixel;
int line_length;
int endian;
} t_data;
@caio-vinicius
caio-vinicius / dhclient.conf
Created July 6, 2021 01:33 — forked from thorsummoner/dhclient.conf
How to request specific IP in /etc/dhcp/
# Configuration file for /sbin/dhclient, which is included in Debian's
# dhcp3-client package.
#
# This is a sample configuration file for dhclient. See dhclient.conf's
# man page for more information about the syntax of this file
# and a more comprehensive list of the parameters understood by
# dhclient.
#
# Normally, if the DHCP server provides reasonable information and does
# not leave anything out (like the domain name, for example), then
@caio-vinicius
caio-vinicius / norminette.sh
Created August 6, 2021 21:09
norminette automatically update in /etc/init.d
#!/bin/sh
wget -q --spider http://google.com
if [ $? -eq 0 ]; then
python3 -m pip --disable-pip-version-check list --outdated | grep norminette >> /tmp/norminette_version.log
if [ $? -eq 0 ]; then
python3 -m pip --disable-pip-version-check -q install --upgrade norminette
fi
fi
@caio-vinicius
caio-vinicius / compile-ffmpeg-nvenc.sh
Created September 7, 2021 12:31
This bash script will compile a static Ffmpeg build with NVENC and VAAPI hardware-accelerated support on Ubuntu in your home directory. You can modify the script to customize the build options as you see fit.
#!/bin/bash
#This script will compile and install a static ffmpeg build with support for nvenc un ubuntu.
#See the prefix path and compile options if edits are needed to suit your needs.
#install required things from apt
installLibs(){
echo "Installing prerequisites"
sudo apt-get update
sudo apt-get -y --force-yes install autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev \
@caio-vinicius
caio-vinicius / chill-zoom.sh
Created December 17, 2021 18:49 — forked from abraithwaite/chill-zoom.sh
Zoom in Systemd Cgroups on Linux. Change the max allocations to fit your workstation.
#!/usr/bin/bash -xe
cat <<EOF > "${HOME}/.config/systemd/user/zoom.slice"
[Slice]
AllowedCPUs=0-4
MemoryHigh=6G
EOF
cat /usr/share/applications/Zoom.desktop | sed -E 's#^(Exec=).*$#Exec=/usr/bin/systemd-run --user --slice=zoom.slice /opt/zoom/ZoomLauncher#' > "${HOME}/.local/share/applications/Zoom.desktop"
@caio-vinicius
caio-vinicius / ubuntu-focal-autoinstall-virtualbox.md
Created January 13, 2022 12:09 — forked from bitsandbooks/ubuntu-focal-autoinstall-virtualbox.md
Ubuntu 20.04 with Autoinstall using VirtualBox [DRAFT]

Ubuntu 20.04 + Autoinstall + VirtualBox

Intro

This guide will explain how to set up a [VirtualBox][] VM running [Ubuntu 20.04][] and, using the new [autoinstall][] tool and cloud-init, install OpenSSH server, add a group and a user, who can then connect to the machine via SSH. This was done on a 2016 MacBook Pro running macOS 10.15 "Catalina" and VirtualBox 6.1.6 (with the VirtualBox Guest Additions installed).

You will also need a group name, a username, a password hash and an SSH key pair.

How Autoinstall Works

@caio-vinicius
caio-vinicius / readme.md
Created February 7, 2022 16:23 — forked from Startouf/readme.md
Update CRD for helm traefik migration from 2.4 to 2.5
@caio-vinicius
caio-vinicius / list.h
Created March 18, 2022 13:14 — forked from gmcclure/list.h
Simple doubly linked list implementation, from the Linux kernel
#ifndef __LIST_H
#define __LIST_H
/* This file is from Linux Kernel (include/linux/list.h)
* and modified by simply removing hardware prefetching of list items.
* Here by copyright, credits attributed to wherever they belong.
* Kulesh Shanmugasundaram (kulesh [squiggly] isis.poly.edu)
*/
/*
@caio-vinicius
caio-vinicius / build_wireshark.sh
Created May 30, 2022 17:04 — forked from syneart/build_wireshark.sh
BUILD WIRESHARK ON UBUNTU OR DEBIAN
#!/bin/sh
# This shell script is made by SyneArt <sa@syneart.com>
#######################################
# BUILD WIRESHARK ON UBUNTU OR DEBIAN #
#######################################
# | THIS SCRIPT IS TESTED CORRECTLY ON |
# |------------------------------------------------------|
# | OS | Wireshark | Test | Last test |
# |----------------|----------------|------|-------------|