Skip to content

Instantly share code, notes, and snippets.

View brettwise's full-sized avatar

Brett Wise brettwise

View GitHub Profile
// I am trying to suppress the img from displaying when user is on about page.
{% assign about = site.pages['about'] %}
{% unless about %}
<img src="{{meta['featured-icon']}}" alt="featured icon" class="featured-icon">
{% endunless%}
// Also tried below per https://github.com/Shopify/liquid/wiki/Liquid-for-Designers

Keybase proof

I hereby claim:

  • I am brettwise on github.
  • I am brettwise (https://keybase.io/brettwise) on keybase.
  • I have a public key whose fingerprint is 0C1D D95E 2541 FB39 434F 3B3C 30FE 7357 1F14 32FD

To claim this, I am signing this object:

@brettwise
brettwise / finder.exs
Last active December 8, 2015 05:09
finder.exs
defmodule Finder do
@doc """
`run` takes a word or phrase via the `search_term` argument and passes it to `find'. But primarily `run` returns a list of files from a specified directory and passes it to the `find` function.
"""
def run(directory_path, search_term) do
[head|tail] = File.ls!(directory_path)
find([head|tail], 0, directory_path, search_term)
end
@brettwise
brettwise / dna_counter.ex
Created April 6, 2016 00:55
rosalind-dna-counter
defmodule DnaCounter do
def main(string) do
dna_list =
string
|> String.codepoints
letters_to_count = get_letters_to_count(dna_list)
count_occurences(dna_list, letters_to_count)
end