This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nmcli aliases from man nmcli | |
alias wifi-list='nmcli dev wifi list' | |
alias wifi-connect='nmcli con up id' | |
alias wifi-add='nmcli --ask dev wifi connect ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# modification of https://github.com/fearside/ProgressBar/ | |
# 1. Create ProgressBar function | |
# 1.1 Input is currentState($1) and totalState($2) | |
function ProgressBar { | |
# Process data | |
let _progress=(${1}*100/${2}*100)/100 | |
let _done=(${_progress}*4)/10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You can use a Function Attribute called optimize to do this. | |
// I got the info on Function Attributes from this link: | |
// https://gcc.gnu.org/onlinedocs/gcc-4.5.4/gcc/Function-Attributes.html#Function-Attributes | |
// To set the optimization level to -O0 for a function: | |
void __attribute__ ((optimize("-O0"))) foo() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# some silly programs force themselves to output to /dev/tty this makes it messy for scripts that call them | |
# heres a way to workaround this issue | |
script --command `pwd`/what_i_wanted_to_do.bash /dev/null >> output.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# fresh start | |
rm -rf build_opencv | |
mkdir build_opencv | |
# grab all of opencv | |
# git clone https://github.com/opencv/opencv.git | |
# git clone https://github.com/opencv/opencv_extra.git | |
# git clone https://github.com/opencv/opencv_contrib.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# idea from: https://stackoverflow.com/questions/2683279/how-to-detect-if-a-script-is-being-sourced | |
[[ "${BASH_SOURCE[0]}" != "${0}" ]] || echo -e "\e[31m""${BASH_SOURCE[0]} needs sourced to set the environment variables in this shell""\e[0m" | |
#set environment variables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.1) | |
project(dw_wrapper) | |
set (CMAKE_CXX_STANDARD 11) | |
# FindDriveworks.cmake, ArchConfiguration.cmake, and LibFindMacros.cmake were needed for my setup they are taken from driveworks/samples/cmake/ | |
# ArchConfiguration.cmake was the only file that needed small changes, remove the fatal error on line 17 and add the following lines in its place | |
# set(VIBRANTE TRUE) | |
# add_definitions(-DVIBRANTE) | |
# this is the path I placed the driveworks cmake files in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void unsignedReverseIteration(){ | |
unsigned int chan; | |
// for some odd reason you decide to reverse iterate | |
for(chan=31; chan >= 0 ; chan--){ | |
// logic, that executes forever in a loop, because chan is never less than 0 | |
} | |
// code doesn't ever get here! | |
} |
NewerOlder