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
@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)
@dweldon
dweldon / install-docker.sh
Last active Dec 1, 2019
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/
@jteneycke
jteneycke / b.rb
Last active Nov 8, 2019 — forked from junegunn/b.rb
b - browse Chrome bookmarks with fzf
View b.rb
#!/usr/bin/env bash
# vim: set filetype=ruby:
# b - browse Chrome bookmarks with fzf
/usr/bin/ruby -x "$0" |
fzf-tmux -u 30% --ansi --multi --no-hscroll --tiebreak=begin |
awk 'BEGIN { FS = "\t" } { print $2 }' |
xargs xdg-open
exit $?
View how-to-force-google-calendar-to-refresh-subscribed-calendar.md

Given a subscribed calendar with a url like

https://example.com/example.ics

To force Google Calendar to refresh and reload the contents right now, unsubscribe from the calendar and subscribe to a new calendar with a URL like

https://example.com/example.ics#1

Adding the anchor tag will force Google Calendar to think of it as a new calendar

You can’t perform that action at this time.