Skip to content

Instantly share code, notes, and snippets.

View daveharris's full-sized avatar

Dave Harris daveharris

View GitHub Profile
@daveharris
daveharris / Challenge 1.md
Last active May 11, 2020 09:23
Coding Challenge

In the programming language of your choice, write a program that accepts an array of words, and calculates the number of vowels. For example, Given:

['hello', 'world']

Produces:

a: 0
e: 1
i: 0
@daveharris
daveharris / bashmarks-homebrew.rb
Created November 24, 2014 00:41
Bashmarks Homebrew Install Formula
require "formula"
class Bashmarks < Formula
homepage "https://github.com/huyng/bashmarks"
url "https://github.com/daveharris/bashmarks/archive/1.0.tar.gz"
sha1 "53010ce4f613e5e30070ceae01eee5526f3063b2"
version "1.0"
def install
system "make", "install"
@daveharris
daveharris / modularise.rb
Created February 19, 2014 23:46
Add "Module MyModule" to all ruby files
Dir["**/*.rb"].each do |file|
contents = IO.readlines(file)
open(file, "w") do |f|
f.puts "module MyModule\n"
contents.each { |line| f.write " #{line}" }
f.puts "\nend"
end
end