Skip to content

Instantly share code, notes, and snippets.

View navyjeff's full-sized avatar
🏠
Working from home

Jeff Borck navyjeff

🏠
Working from home
View GitHub Profile
@navyjeff
navyjeff / Install_OpenCV4_CUDA12.6_CUDNN8.9.md
Created October 29, 2025 15:57 — forked from raulqf/Install_OpenCV4_CUDA12.6_CUDNN8.9.md
How to install OpenCV 4.10 with CUDA 12 in Ubuntu 24.04

Install OpenCV 4.10 with CUDA 12.6 and CUDNN 8.9 in Ubuntu 24.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries:

@navyjeff
navyjeff / gist:83c248e7e5dca0f0a2fc735f61be17ae
Created August 1, 2019 00:29
FB adblock filter for inline newsfeed ads
www.facebook.com##div[id^=hyperfeed_story_id_]:has(a[role^=button]:has(> span:has-text(/S/i):has-text(p):has-text(o):has-text(n):has-text(r):has-text(e):has-text(d):not(:has-text(0)):not(:has-text(1)):not(:has-text(2)):not(:has-text(3)):not(:has-text(4)):not(:has-text(5)):not(:has-text(6)):not(:has-text(7)):not(:has-text(8)):not(:has-text(9))))
@navyjeff
navyjeff / keyboard
Created October 26, 2018 18:48
/etc/default/keyboard : Thinkpad keyboard, set caps lock to control key
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="thinkpad60"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS="terminate:ctrl_alt_bksp,compose:menu,ctrl:nocaps"
BACKSPACE="guess"
--- g2uj23us.iso.orig.hex 2016-04-27 17:22:51.793876085 +1000
+++ g2uj23us.iso.hex 2016-04-27 17:22:40.877685523 +1000
@@ -8554,8 +8554,8 @@
00021690 00 00 00 00 00 00 00 00 9f 1b 44 00 85 24 00 00 |..........D..$..|
000216a0 43 4f 4e 46 49 47 20 20 53 59 53 20 00 00 00 00 |CONFIG SYS ....|
000216b0 00 00 48 41 00 00 e8 6c 8f 3a 49 00 7b 00 00 00 |..HA...l.:I.{...|
-000216c0 41 55 54 4f 45 58 45 43 42 41 54 20 00 00 00 00 |AUTOEXECBAT ....|
-000216d0 00 00 88 38 00 00 e9 92 84 38 4a 00 3a 00 00 00 |...8.....8J.:...|
+000216c0 41 55 54 4f 45 58 45 43 42 41 54 20 00 00 cf 8a |AUTOEXECBAT ....|
+000216d0 9b 48 9b 48 00 00 cf 8a 9b 48 4a 00 0d 02 00 00 |.H.H.....HJ.....|
@navyjeff
navyjeff / Ruscio2008_cor_generate.R
Created February 22, 2016 21:28 — forked from nicebread/Ruscio2008_cor_generate.R
Ruscio - Code for generating correlating variables with arbitrary distributions
## This code snippet is taken from Ruscio, J., & Kaczetow, W. (2008). Simulating Multivariate Nonnormal Data Using an Iterative Algorithm. Multivariate Behavioral Research, 43(3), 355–381.
## In the original code were some errors; this is a cleaned version.
## 2012 Felix Schönbrodt
#' @param Pop List with empirical samples
#' @param rho The correlation to be induced
@navyjeff
navyjeff / filemove.py
Created August 1, 2013 17:09
I used this to move all my video files from one directory into their own subdirectories with the same name as the file.
import os
import shutil
import fnmatch
path = os.getcwd()
filelist = os.listdir(path)
files = fnmatch.filter(filelist, '*.avi')
# If you have more than one file type:
# files += fnmatch.filter(filelist, '*.m4v')