Skip to content

Instantly share code, notes, and snippets.

Avatar

SterlingButters

View GitHub Profile
View kinect-webcam-install.sh
apt-get install ffmpeg
echo "Cloning GSPCA Repo..."
git clone https://github.com/grandchild/gspca-kinect2.git && cd gspca-kinect2
echo "Building & Installing Modules (copying into /lib/modules/`uname -r`/kernel/drivers/kinect)"
make -C /lib/modules/`uname -r`/build M=`pwd` SRCROOT=`pwd` clean modules
cp gspca_main.ko gspca_kinect_main.ko
mkdir /lib/modules/`uname -r`/kernel/drivers/kinect
cp gspca_kinect_main.ko /lib/modules/`uname -r`/kernel/drivers/kinect/gspca_kinect_main.ko
cp gspca_kinect2.ko /lib/modules/`uname -r`/kernel/drivers/kinect/gspca_kinect2.ko
@SterlingButters
SterlingButters / odrive_dir_sync.sh
Created Apr 12, 2019
Syncs oDrive files in the pwd (does not recurse into sub-dirs)
View odrive_dir_sync.sh
#!/bin/bash
for file in ./*; do
if [[ "$file" = *.cloud ]]; then
echo "File[$file] not synced"
/usr/bin/python /home/sterlingbutters/.odrive-agent/bin/odrive.py sync "$file"
elif [[ "$file" = *.cloudf ]]; then
echo "File[$file] not synced"
/usr/bin/python /home/sterlingbutters/.odrive-agent/bin/odrive.py sync "$file"
@SterlingButters
SterlingButters / odrive_deep_sync.sh
Created Apr 12, 2019
Recursively Syncs oDrive Directories and SubDirectories starting from pwd
View odrive_deep_sync.sh
#!/bin/bash
handle_directory(){
for filename in "$1"/*; do
if [[ "$filename" = *.cloud ]]; then
echo "File[$filename] not synced"
/usr/bin/python /home/sterlingbutters/.odrive-agent/bin/odrive.py sync "$filename"
elif [[ "$filename" = *.cloudf ]]; then
echo "File[$filename] not synced"
/usr/bin/python /home/sterlingbutters/.odrive-agent/bin/odrive.py sync "$filename"