Skip to content

Instantly share code, notes, and snippets.

View Brainiarc7's full-sized avatar

Dennis E. Mungai Brainiarc7

View GitHub Profile
@Brainiarc7
Brainiarc7 / add.sh
Created December 6, 2019 07:34 — forked from ArseniyShestakov/add.sh
My compiler alternatives
# Cleanup old alternatives
update-alternatives --remove-all cc
update-alternatives --remove-all c++
update-alternatives --remove-all gcc
update-alternatives --remove-all g++
update-alternatives --remove-all clang
update-alternatives --remove-all clang++
update-alternatives --remove-all icc
update-alternatives --remove-all icc++
@Brainiarc7
Brainiarc7 / 01-ubuntu-18.4lts-evoc-p775tm1-r.md
Last active January 19, 2020 01:30
These gists document installing and configuring Ubuntu 18.04LTS on the EVOC P775TM1-R

Installing Linux on the EVOC P775TM1-R:

For starters,

If you are dual booting, install Windows first, and partition from there with a tool such as Minitool. You'll only need two partitions, one for root and optionally, a small one for swap (say, 8GB). Partition them as appropriate, and when done, reboot into the UEFI menu and ensure that:

(a). Secure boot is disabled (otherwise you won't be able to load up proprietary drivers needed for the Nvidia GPU).

(b). Confirm that you're booting in UEFI mode ONLY. This is the default. CSM should remain disabled. Here's why.

@Brainiarc7
Brainiarc7 / h264_nvenc
Created July 22, 2019 18:41 — forked from nico-lab/h264_nvenc.txt
ffmpeg -h encoder=h264_nvenc
Encoder h264_nvenc [NVIDIA NVENC H.264 encoder]:
General capabilities: delay hardware
Threading capabilities: none
Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 rgb0 cuda d3d11
h264_nvenc AVOptions:
-preset <int> E..V..... Set the encoding preset (from 0 to 11) (default medium)
default E..V.....
slow E..V..... hq 2 passes
medium E..V..... hq 1 pass
fast E..V..... hp 1 pass
@Brainiarc7
Brainiarc7 / amdgpu_compute_mode_linux.php
Created July 3, 2019 11:27 — forked from divinity76/ubu_1804_amdgpu_compute_mode_linux.php
sets "compute mode" on AMD GPU's in linux
#!/usr/bin/env php
<?php
declare(strict_types = 1);
if (posix_geteuid () !== 0) {
die ( "error: this script requires root privileges, re-run it as root." );
}
$amdgpu_dir = '/sys/bus/pci/drivers/amdgpu';
$dirs = array_filter ( array_map ( 'trim', glob ( $amdgpu_dir.DIRECTORY_SEPARATOR.'*', GLOB_NOSORT | GLOB_ONLYDIR | GLOB_MARK ) ), function (string $str) {
return (is_writable ( $str."power_dpm_force_performance_level" ) && is_writable ( $str.'pp_compute_power_profile' ));
} );
@Brainiarc7
Brainiarc7 / boot.bif
Created June 27, 2019 21:02 — forked from KeitetsuWorks/boot.bif
BIF File for Zynq UltraScale+ MPSoC
the_ROM_image:
{
[fsbl_config] a53_x64
[bootloader] <fsbl.elf>
[pmufw_image] <pmufw.elf>
[destination_device=pl] <bitstream>
[destination_cpu=a53-0, exception_level=el-3, trustzone] <bl31.elf>
[destination_cpu=a53-0, exception_level=el-2] <u-boot.elf>
}
@Brainiarc7
Brainiarc7 / ubuntu_setup.md
Created June 23, 2019 04:13 — forked from AnmolTomer/ubuntu_setup.md
Ubuntu Setup
  1. Installing NVIDIA Drivers ❗❗
ubuntu-drivers devices
sudo ubuntu-drivers autoinstall
  1. From last command see nvidia-driver-number and use it in the command below and then reboot 📺 ✔️
@Brainiarc7
Brainiarc7 / run.sh
Created June 9, 2019 20:47 — forked from tmehlinger/run.sh
gstreamer RTP to RTMP
#!/bin/bash
# tested on Ubuntu 16.04
apt-get install -y \
gstreamer1.0-libav \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-tools
@Brainiarc7
Brainiarc7 / ubuntu-tweak.sh
Created April 22, 2019 02:13 — forked from salaros/ubuntu-tweak.sh
My tweaks for Ubuntu + Dell Inspiron 5567
#!/usr/bin/env bash
# Require root to run
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit 0
fi
# [PlayOnLinux] - disables protection against the usage of Ptrace
# https://www.playonlinux.com/en/topic-10534-Regarding_ptrace_scope_fatal_error.html
@Brainiarc7
Brainiarc7 / ffmpeg-extract-keyframes.sh
Created December 14, 2018 23:14 — forked from savvot/ffmpeg-extract-keyframes.sh
Extract only keyframes (I-frames) from video to images with console ffmpeg
ffmpeg -ss <start_time> -i video.mp4 -t <duration> -q:v 2 -vf select="eq(pict_type\,PICT_TYPE_I)" -vsync 0 frame%03d.jpg
@Brainiarc7
Brainiarc7 / powercfg-win10-more-settings.cmd
Created November 12, 2018 14:16 — forked from Nt-gm79sp/powercfg-win10-more-settings.cmd
Show/hide hidden settings in Win10 Power Options
@echo on
REM checked for Windows 10
REM fork from https://gist.github.com/theultramage/cbdfdbb733d4a5b7d2669a6255b4b94b
REM you may want full list https://gist.github.com/raspi/203aef3694e34fefebf772c78c37ec2c
REM SET attrib=+ATTRIB_HIDE
SET attrib=-ATTRIB_HIDE
REM Hard disk burst ignore time
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 80e3c60e-bb94-4ad8-bbe0-0d3195efc663 %attrib%