Skip to content

Instantly share code, notes, and snippets.

View corndog2000's full-sized avatar

Joe Schroedl corndog2000

View GitHub Profile
@corndog2000
corndog2000 / Framework_16_dmidecode_output.txt
Last active March 26, 2024 19:14
Framework 16 dmidecode output
# dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 3.5.0 present.
Table at 0x51672000.
Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
Vendor: INSYDE Corp.
Version: 03.02
Release Date: 01/23/2024
@corndog2000
corndog2000 / start-matlab.sh
Last active February 17, 2022 00:43
Launch Matlab 2021b on Linux with hardware rendering and without a terminal
#!/bin/bash
# Make this file executable by running chmod +x start-matlab.sh
# Change 'R2021b' to your current folder to match the version you are using.
export MESA_LOADER_DRIVER_OVERRIDE=i965; /usr/local/MATLAB/R2021b/bin/matlab -nosoftwareopengl -desktop
@corndog2000
corndog2000 / syncDB.sh
Created November 14, 2021 00:43
Sync an influxdb from a remote host, Rasberry Pi, to local server
#!/bin/bash
echo "Delete old downloaded databases"
sudo rm -r /home/centos/Downloads/influx_temp
echo "Download databases from raspberry pi"
rsync -avzrx -e ssh --rsync-path="sudo rsync" pi@172.30.16.31:/var/lib/influxdb /home/centos/Downloads/influx_temp
echo "Stop the influxdb service so the script can remove current local databases"
sudo systemctl stop influxdb
@corndog2000
corndog2000 / update.sh
Created August 26, 2021 15:01
Update script for Fedora 33/34
#!/bin/bash
sudo fwupdmgr get-devices
sudo fwupdmgr refresh --force
sudo fwupdmgr get-updates
sudo fwupdmgr update
sudo flatpak uninstall --unused
sudo flatpak update -y
@corndog2000
corndog2000 / configure_cuda_p70.md
Created June 28, 2020 03:58 — forked from alexlee-gk/configure_cuda_p70.md
Use integrated graphics for display and NVIDIA GPU for CUDA on Ubuntu 14.04

This was tested on a ThinkPad P70 laptop with an Intel integrated graphics and an NVIDIA GPU:

lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation Device 191b (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GM204GLM [Quadro M3000M] (rev a1)

A reason to use the integrated graphics for display is if installing the NVIDIA drivers causes the display to stop working properly. In my case, Ubuntu would get stuck in a login loop after installing the NVIDIA drivers. This happened regardless if I installed the drivers from the "Additional Drivers" tab in "System Settings" or the ppa:graphics-drivers/ppa in the command-line.

// gps_read.c
// Joe Schroedl
// February 25, 2020
// https://gist.github.com/corndog2000/5caa522f9a8fc75bb9d61e518d4d1cb8
#include <stdio.h>
#include <sys/types.h>
#include <termios.h>
#include <fcntl.h>
#include <stdlib.h>
@corndog2000
corndog2000 / videoToPics.sh
Created June 30, 2019 22:16
videoToPics: Creates a picture from a video frame at set intervals.
#!/bin/bash
green=`tput setaf 2`
reset=`tput sgr0`
counter=3
while [ $counter -le 26 ]; do
#command="ffmpeg -i ~/Videos/RDR2/Part$counter.mkv -r 0.25 ~/Pictures/Part$counter/output_%04d.png"
#echo $command
@corndog2000
corndog2000 / tess-try.py
Created June 30, 2019 22:14
tess-try: Try to classify pictures based on optical-character-recognition if the picture contains certain letters.
# coding=UTF-8
#import the Image library from Pillow
from PIL import Image
#import the tesseract library
import pytesseract
#this is needed to create directories
import os
#library for iterating every file in a directory
import glob
@corndog2000
corndog2000 / frameClassifier.sh
Last active June 30, 2019 22:14
frameClassifier: Create a copy of images with a certain amount of the color red/black into a separate folder.
#!/bin/bash
counter2=5
while [ $counter2 -le 26 ]; do
cd ~/Pictures/Part$counter2/
mkdir PossibleFrames
counterAdjusted=1
red=`tput setaf 1`