Skip to content

Instantly share code, notes, and snippets.

View rubysolo's full-sized avatar

Solomon White rubysolo

View GitHub Profile
defmodule IexHelpers do
def search_fn(name) do
:code.all_loaded()
|> Enum.filter(fn {mod, _} -> "#{mod}" =~ ~r{^[A-Z]} end)
|> Enum.map(fn {mod, _} -> mod end)
|> Enum.each(fn mod ->
mod.__info__(:functions)
|> Enum.each(fn {fun_name, arity} ->
if fun_name == name do
IO.puts "#{mod}.#{fun_name}/#{arity}"
@henrik
henrik / dokku_on_digital_ocean.md
Last active May 12, 2022 14:38
Notes from running Dokku on Digital Ocean.

My notes for Dokku on Digital Ocean.

These may be a bit outdated: Since I originally wrote them, I've reinstalled on a newer Dokku and may not have updated every section below.

Commands

Install dokku-cli (gem install dokku-cli) for a more Heroku-like CLI experience (dokku config:set FOO=bar).

# List/run commands when not on Dokku server (assuming a "henroku" ~/.ssh/config alias)

ssh henroku dokku

@seeflanigan
seeflanigan / docker-compose.yml
Last active April 18, 2020 07:23
Docker Compose file for running Clojure Koans
koans:
image: clojure
command: lein koan run
volumes:
- ./clojure-koans:/clojure-koans
working_dir: /clojure-koans
repl:
image: clojure
command: lein repl
#!/usr/bin/env ruby
def Inherits(*classes)
klass = Class.new classes.shift # inherit from the last clas
while refine_with = classes.shift # include the others as module refinements just so we can turn them into modules
klass.include Module.new { include refine(refine_with) { } }
end
klass
end