Skip to content

Instantly share code, notes, and snippets.

@solomonhawk
solomonhawk / example.md
Last active July 28, 2016 19:46
craft-profile Results Compared

This table shows Craft Template Profiling data before and after adding {% cache %} tags.

10 Iteration(s), 1 Worker(s): 110 Total Jobs Before Avg. Time After Avg. Time Before Time STD After Time STD Before Avg. Queries After Avg. Queries
/search/results?q=* 0.8409s 0.1132s (-86.5%) 41.022 0.762 40 13 (-67.5%)
/resources 0.8308s 0.1164s (-86.0%) 34.891 1.290 37 12 (-67.6%)
/collections 0.7083s 0.1520s (-78.5%) 12.069 0.678 52.1 15 (-71.2%)
/entry/page-block-testing 1.0612s 0.2314s (-78.2%) 8.968 1.58
@solomonhawk
solomonhawk / drupal-views-share-global-text-field
Created March 9, 2017 19:37 — forked from chrisl8888/drupal-views-share-global-text-field
share url's for facebook, twitter, pinterest with just get variables
<ul>
<li class="share-text">Share this>/li>
<li class="share-tw"><a href="http://twitter.com/share?text=[title]"><span></span></a></li>
<li class="share-fb"><a href="http://www.facebook.com/sharer.php?u=/node/[nid]&p=[title]"><span></span></a></li>
<li class="share-pinterest"><a href="http://pinterest.com/pin/create/button/?url=/node/[nid]&description=[title]"><span></span></a></li>
</ul>
@solomonhawk
solomonhawk / ._notes.md
Last active July 11, 2017 17:33
Viget: New Project FED Setup

Babel:

Syntax:

  • ESLint
  • Prettier

Testing:

defmodule BlogDemo.Content.Block do
use Ecto.Schema
import Ecto.Changeset
alias __MODULE__
@derive {Jason.Encoder, []}
embedded_schema do
field :content, :map
field :type, :string
field :blocks, {:array, Block}, default: []
@solomonhawk
solomonhawk / Textile syntax
Last active July 29, 2020 14:40 — forked from rbnrivera/Textile syntax
Textile syntax
Bold Text
*this is bold*
===========================
Italic text
_this is italic_
@solomonhawk
solomonhawk / devtools.md
Created January 5, 2021 19:01
My So-Called "Dev Tools"
@solomonhawk
solomonhawk / blog.md
Last active October 20, 2021 19:51
3 Elixir Language Features I Love

3 Elixir Language Features I Love

We are truly privileged to select from a wide variety of programming languages that support different programming paradigms and offer various features.

I've been working more and more with Elixir over the past couple of years and have come to enjoy working in the functional paradigm. Here are a few of the features offered by the language that I love.

  • easy to use (reduces the # of things we have to load up into brain RAM)
  • eliminates a large class of bugs related to mutation and shared state (both of which are critical to programs that do Interesting Things™)
  • supportable by libraries if unavailable in host language