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
@caio-vinicius
caio-vinicius / vim-nginx-conf-highlight.sh
Created January 7, 2021 13:05 — forked from ralavay/vim-nginx-conf-highlight.sh
Enable syntax highlight for Nginx conf file in Vim
#!/bin/bash
#
# Highligh Nginx config file in Vim
# Download syntax highlight
mkdir -p ~/.vim/syntax/
wget http://www.vim.org/scripts/download_script.php?src_id=19394 -O ~/.vim/syntax/nginx.vim
# Set location of Nginx config file
cat > ~/.vim/filetype.vim <<EOF
@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 / 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 |
# |----------------|----------------|------|-------------|
@caio-vinicius
caio-vinicius / dhcpd.conf
Created July 5, 2022 17:21 — forked from TyrfingMjolnir/dhcpd.conf
Host Apple's netboot images from ISC DHCPD
class "Apple-Intel-Netboot" {
# Limit this class to only Intel Apple machines
match if substring (option vendor-class-identifier, 0, 14) = "AAPLBSDPC/i386";
option dhcp-parameter-request-list 1,3,17,43,60; # Send these options to the client (possibly forcing it, if the client didn't request it)
# From: http://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xml
# 1 - Subnet Mask
# 3 - Router
# 17 - Root Path
# 43 - Vendor Specific
# 60 - Class ID