Skip to content

Instantly share code, notes, and snippets.

How Clojure's documentation can leapfrog other languages

Summary

I made a documentation generator that cashes in on Clojure's dynamism. See the play-cljs docs (a ClojureScript game library) for an example of its output.

The Problem

Like many of you, I've often wondered what my final regret will be on my deathbed. My best guess came to me in a dream recently. I was walking across the charred earth of an apocalyptic future world, maneuvering around the remains of the less fortunate. I was startled to find a young girl, barely holding onto her life. She murmured something to me. I asked her to repeat it, and she said more loudly: "I...wish your Clojure projects didn't have such crappy documentation."

@gregelin
gregelin / django_erd_steps.md
Created December 3, 2017 12:59
Generating ERD for django projects
# Install django-extensions
# http://django-extensions.readthedocs.io/en/latest/installation_instructions.html
pip3 install django-extensions

# Add django-extensions INSTALLED_APPS in siteapp > settings.py
# INSTALLED_APPS = (
#    ...
#    'django_extensions',
# )
@marshyyyy
marshyyyy / BlockYouTubeHostsFile
Created November 18, 2017 05:02
Block YouTube Hosts File
0.0.0.0 host.youtube.com
0.0.0.0 mx.youtube.com
0.0.0.0 admin.youtube.com
0.0.0.0 devel.youtube.com
0.0.0.0 stats.youtube.com
0.0.0.0 http.youtube.com
0.0.0.0 mx0.youtube.com
0.0.0.0 administration.youtube.com
0.0.0.0 development.youtube.com
0.0.0.0 svn.youtube.com
@tomwwright
tomwwright / gist:f88e2ddb344cf99f299935e1312da880
Last active November 22, 2022 14:06
Dell XPS 15 9560: Ubuntu 17.10 + Nvidia 384.90 + Nvidia Prime (No Bumblebee) https://medium.com/@tomwwright/better-battery-life-on-ubuntu-17-10-4588b7f72def
# perform a fresh install of Ubuntu 17.10
# upgrade the kernel to v4.13.10
mkdir ~/kernel-v4.13.10
cd ~/kernel-v4.13.10
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310_4.13.10-041310.201710270531_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-image-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb
sudo dpkg -i *.deb
@arslan-gg
arslan-gg / app_name.service
Last active September 2, 2021 10:17
systemd service script
# service configuration example
[Unit]
Description=AppName
Requires=network.target
[Service]
Type=simple
User=your_user_name
Group=your_user_group
@ipmb
ipmb / settings.py
Last active November 24, 2023 20:25
Django logging example
import logging.config
import os
from django.utils.log import DEFAULT_LOGGING
# Disable Django's logging setup
LOGGING_CONFIG = None
LOGLEVEL = os.environ.get('LOGLEVEL', 'info').upper()
logging.config.dictConfig({
@grimzy
grimzy / git-pull-all
Created September 15, 2017 02:15
Git pull all remote branches
#!/usr/bin/env bash
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
@Geoff-Ford
Geoff-Ford / composing-software.md
Last active March 3, 2024 08:48
Eric Elliott's Composing Software Series

Eric Elliott's "Composing Software" Series

A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.

Edit: I see that each post in the series now has index, previous and next links. However, they don't follow a linear flow through all the articles with some pointing back to previous posts effectively locking you in a loop.

@ezra-chu
ezra-chu / core.cljs
Last active April 10, 2019 08:06 — forked from bhauman/core.cljs
Using lumo-cljs to run an Express server
(ns server.core
(:require
[cljs.nodejs :as nodejs]))
; Bring in `express` and `http` modules.
(defonce express (nodejs/require "express"))
(defonce http (nodejs/require "http"))
; Create our app.
(def app (express))
@sebastiencs
sebastiencs / volume.sh
Last active February 13, 2024 11:19
Script to get volume notification with dunst http://imgur.com/a/qWgAw
#!/bin/bash
# You can call this script like this:
# $./volume.sh up
# $./volume.sh down
# $./volume.sh mute
function get_volume {
amixer get Master | grep '%' | head -n 1 | cut -d '[' -f 2 | cut -d '%' -f 1
}