Skip to content

Instantly share code, notes, and snippets.

Josh Teneycke jteneycke

Block or report user

Report or block jteneycke

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dptsolutions / dell-smm-hwmon.conf
Created Sep 29, 2019
dell-smm-hwmon.conf to force loading of dell-smm-hwmon module on "unsupported" Dell laptops (like XPS 13 9350)
View dell-smm-hwmon.conf
#Force loading of the Dell Laptop SMM BIOS hwmon driver
options dell-smm-hwmon ignore_dmi=1 restricted=0 force=1
#Added ignore_dmi=1 per
#Added force=1 per
jtlocsei /
Last active Jul 31, 2019
Edit and run code on remote server as if it's local with Clojure

Mirror + Clojure remote REPL

Motivation & summary

In a nutshell

Use mirror + clojure remote repl to edit and run clojure files on a server as if they're local.

What does it add beyond clojure remote REPL alone?

View gist:f650a181e67dec3bc78aac4673773583
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<p>Starting Value: <input type="number" name="startingVal" id="startingVal"><br></p>
<p>Age: <select max="65" name="age" id="age"></select></p>
zephraph /
Last active Apr 1, 2020
A shell script to clean up all node_modules in projects that haven't been touched in a couple weeks.
DAYS_SINCE_LAST_CHANGE=14 # If a project hasn't been touched in this long its node_modules will be deleted
SEARCH_PATH="./Git" # Update this to the path where your code is stored
node_modules=$(find $SEARCH_PATH -name "node_modules" -type d -prune)
tednaleid / wexec.zsh
Last active Aug 10, 2019
wexec - shell function to allow easy iteration on a shell command, uses watchexec to re-run a command whenever the file is saved
View wexec.zsh
# add to your .zshrc/.bashrc
# sets up "live reload"-like environment for for a single file
# will watch a file (create it if it doesn't exist), every time it is saved it will run a command
EDITOR=mvim # I use MacVim but switch this to whatever you use (something that'll be outside of the same terminal window)
function wexec() {
command -v watchexec >/dev/null 2>&1 || { echo "'watchexec' is required. e.g. brew install watchexec or cargo install watchexec" >&2; exit 1; }
if [[ -z $1 || "$1" == "--help" ]]; then
yogthos / reddit-video.cljs
Last active May 17, 2020
a Lumo script for downloading Reddit videos using youtube-dl
View reddit-video.cljs
#!/usr/bin/env lumo
(ns reddit-video.core
[cljs.core :refer [*command-line-args*]]
[clojure.string :as string]))
(def https (js/require "https"))
(def process (js/require "child_process"))
(defn js->edn [data]
$ cd my_app
$ lore python # launch python in my_app's virtualenv
$ lore pip # my_app's pip
$ lore console # my_app's ipython (installed in virtualenv)
$ lore notebook # my_app's jupyter notebook
$ lore lab # my_app's jupyter lab
$ lore exec # execute anything in my_app's virtualenv/bin/
$ lore env # see what else is in there
$ lore test # you do have unit tests, don't you?
lagenorhynque / deps.edn
Created Jul 12, 2018
EDN to YAML conversion
View deps.edn
{io.forward/yaml {:mvn/version "1.0.9"}}}

;; Automatically generated
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(anzu-cons-mode-line-p nil)
glasslion /
Last active Jun 1, 2020
This script convert youtube subtitle file(vtt) to plain text.
Convert YouTube subtitles(vtt) to human readable text.
Download only subtitles from YouTube with youtube-dl:
youtube-dl --skip-download --convert-subs vtt <video_url>
Note that default subtitle format provided by YouTube is ass, which is hard
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which
is easier to process.
You can’t perform that action at this time.