Skip to content

Instantly share code, notes, and snippets.

View d-j-kendall's full-sized avatar
🏠
Working from home

Kendall d-j-kendall

🏠
Working from home
View GitHub Profile
@d-j-kendall
d-j-kendall / strings.xml
Created May 24, 2019 18:25
Better way to structure android string array
<string-array translatable="false" name="create_user_permission_type">
<item>@string/machine_operator</item>
<item>@string/supervisor</item>
<item>@string/machine_tech</item>
<item>@string/machine_admin</item>
</string-array>
<string name="super_admin">Super Admin</string>
<string name="machine_operator">Machine Operator</string>
<string name="supervisor">Supervisor</string>
@d-j-kendall
d-j-kendall / vid2img.ipynb
Last active June 24, 2019 02:05
getting images from videos using python and opencv
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@d-j-kendall
d-j-kendall / adb+.sh
Created June 27, 2019 16:55
enhanced adb usage on MacOSX
#!/bin/bash
# Script adb+
# Run any command adb provides on all your currently connected devices,
# Or prompt to select one device
# To use adb+ executable.
# Put the executable in this path
# '/usr/local/bin/'
# Then you can use adb+ commands like so:
@d-j-kendall
d-j-kendall / list.sh
Created September 15, 2019 15:28
Export Full Path Name of Files for Yolov3
## lists all files to a text file
ls -d $PWD/test/* | grep .txt > test.txt
@d-j-kendall
d-j-kendall / gdrive.sh
Created October 13, 2019 20:44
file to be added to `/etc/profile.d/` which mounts google drive via application `google-drive-ocamlfuse` this will crash your xserver if you do not have the proper application installed
#!/bin/bash
if [ -d "/home/dkendall/GDRIVE" ];
then
if mount | grep GDRIVE > /dev/null;
then
echo "Do nothing" > /dev/null
else
google-drive-ocamlfuse ~/GDRIVE
fi
fi
@d-j-kendall
d-j-kendall / buildspec.yml
Created November 30, 2020 22:39
Example of PyInstaller NSIS AWS Build Pipeline (Powershell Windows Server 2019)
version: 0.2
phases:
install:
runtime-versions:
python: 3.7.6
commands:
# Downloads NSIS packager from our S3 bucket
- curl https://cc-build-dependencies-repo.s3.amazonaws.com/nsis-3.06.1-setup.exe -O $env:CODEBUILD_SRC_DIR\nsis-3.06.1-setup.exe
# Silently installs NSIS software for All Users on CodeBuild
@d-j-kendall
d-j-kendall / mvn_test.md
Last active June 20, 2021 23:21
Separating Unit Tests From Integration Tests (Tested with Junit5)

Definition

Unit Tests - Tests a small focused piece of code, if the method accesses an outside resource, database, or service, that interaction is mocked. Many different scenarios can be tested - macks can return a null, throw an exception, return the proper data... Please check out this mockito cheat sheet https://gist.github.com/kbrv37/b7b68432f32630a74ce9e936a9d49745

Integration Tests - Tests the same piece of code but with actual interactions. Usually limits your testing scenarios, but you can ensure it works with your particular service, database, api, or resource.

Benefits of separating unit tests and integration tests.

  1. Clarity for developer - when running test locally, the developer can see which tests require outside resources and avoid running them
  2. Automated Build Speed - you can make your automated builds dependent or independent of successful integration tests.
@d-j-kendall
d-j-kendall / terminalSetup.sh
Last active October 20, 2021 04:06
BestTerminalSetup.sh
#/bin/bash
xcode-select —-install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
exec zsh
brew install iterm2