Skip to content

Instantly share code, notes, and snippets.

View 1_rewriting_a_codebase_with_sourceror.exs
# for an example of a suggested `locals_without_parens`, see z_locals_without_parens.exs
# parsing and expanding a formatter.exs file would be a good route too
opts = [sourceror_opts: [locals_without_parens: [...], line_length: 122]]
for transformation <- [&PipeChainStart.run/1, &SinglePipe.run/1] do
ProjTraversal.transform("../my_codebase/", transformation, opts)
end
@milmazz
milmazz / func_geo.livemd
Created Mar 7, 2022
Functional Geometry
View func_geo.livemd

Functional Geometry

Installation

Mix.install([
  {:func_geo, github: "milmazz/func_geo"},
  {:kino, "~> 0.5.0"}
])
@milmazz
milmazz / imposter-handbook-links.md
Last active May 27, 2022
Useful links found in The Imposter's Handbook by Rob Conery
View imposter-handbook-links.md
View keybase.md

Keybase proof

I hereby claim:

  • I am milmazz on github.
  • I am milmazz (https://keybase.io/milmazz) on keybase.
  • I have a public key ASC6uy5gPTM00J1l639F1dsCIqs779YJuWdRF1MKw1l2ygo

To claim this, I am signing this object:

@milmazz
milmazz / ex_doc.md
Last active Apr 17, 2016
Elixir + ExDoc
View ex_doc.md
@milmazz
milmazz / ipv4parser.ex
Last active Jan 15, 2021
The Little Elixir & OTP Guidebook
View ipv4parser.ex
defmodule IPv4Parser do
@moduledoc """
Exercise 2.8.6 from the book The Little Elixir & OTP Guidebook
The idea is to take a look at the IPv4 packet spec and try to write a
parser.
"""
def parse(packet) do
<<
View README.md
@milmazz
milmazz / Portfile
Last active Jan 24, 2016
Portfile for Elixir programming language
View Portfile
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$
PortSystem 1.0
PortGroup github 1.0
github.setup elixir-lang elixir 1.2.1 v
epoch 1
categories lang
platforms darwin
@milmazz
milmazz / Gruntfile.js
Last active Aug 29, 2015
Grunt: The Javascript Task Manager
View Gruntfile.js
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jsdoc : {
dist : {
src: ['src/*.js', 'test/*.js'],
dest: 'doc'
}
@milmazz
milmazz / final.js
Last active Aug 29, 2015
DRY principle
View final.js
// Before:
// CallBacks.loadJsonView(url, "POST", Historicals.UpdateCombo, params);
// After:
$.post(url, params, Historicals.UpdateCombo, "json");
// Before:
// CallBacks.loadPartialView(url, "POST", infoDialog, params);
// After:
$.post(url, params, infoDialog, "html");