Use mirror + clojure remote repl to edit and run clojure files on a server as if they're local.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def safe-requires | |
"List of namespaces to require and refer when inside user ns at load time. | |
Can be given an initialization body to execute after having been required. | |
To do so, wrap the lib spec in a vector, and all elements after the lib | |
spec vector will be evaled after the lib spec has been required." | |
'[[clojure.repl :as repl :refer (source apropos dir pst doc find-doc)] | |
[clojure.java.javadoc :as javadoc :refer (javadoc)] | |
[clojure.pprint :as pprint :refer (pp pprint)] | |
[clojure.stacktrace :as stacktrace :refer (e)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
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 | |
TOTAL_BYTES_REMOVED=0 | |
Mb=1000000 | |
Kb=1000 | |
node_modules=$(find $SEARCH_PATH -name "node_modules" -type d -prune) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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] |
This documents the upgrade from Rails 4.2 to 5.2 through four parts: Backend, Frontend, Infrascture and Checkboxes
Run rake command rails app:update
, it creates a set of new configration files for active storage, action cable, content security policy etc. As we dont use these features, the default ones from code generation are kept.
How to write an awesome-wm config with Fennel
Awesome-WM is a X11 window manager, that is configured via Lua. Fennel is a Lisp for Lua. This shows a general setup of how to write your awesome-wm config using fennel directly without the compilation step (which would also work, but is not needed).
Fetch a recent Fennel version (the
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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? |
NewerOlder