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
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 https://www.reddit.com/r/Dell/comments/9pdgid/configuring_the_xps_to_play_nice_with_linux/
#Added force=1 per https://askubuntu.com/questions/1094485/dell-xps-15-9570-how-to-control-the-fans
@jtlocsei
jtlocsei / mirror-and-remote-repl.md
Last active Jul 31, 2019
Edit and run code on remote server as if it's local with Clojure
View mirror-and-remote-repl.md

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">
<head>
<meta charset="UTF-8">
<title>Calculator</title>
</head>
<body>
<form>
<p>Starting Value: <input type="number" name="startingVal" id="startingVal"><br></p>
<p>Age: <select max="65" name="age" id="age"></select></p>
@tednaleid
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
yogthos / reddit-video.cljs
Last active Jun 19, 2019
a Lumo script for downloading Reddit videos using youtube-dl
View reddit-video.cljs
#!/usr/bin/env lumo
(ns reddit-video.core
(:require
[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]
View tour.sh
$ 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
lagenorhynque / deps.edn
Created Jul 12, 2018
EDN to YAML conversion
View deps.edn
{:deps
{io.forward/yaml {:mvn/version "1.0.9"}}}
View customize.material-dark-theme.md

;; Automatically generated
(custom-set-variables
 ;; 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
glasslion / vtt2text.py
Last active Feb 14, 2020
This script convert youtube subtitle file(vtt) to plain text.
View vtt2text.py
"""
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.
@dweldon
dweldon / install-docker.sh
Last active Jan 19, 2020
Install docker CE on Linux Mint 18.3
View install-docker.sh
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce
# https://docs.docker.com/compose/install/
You can’t perform that action at this time.