Skip to content

Instantly share code, notes, and snippets.

@HazelGrant
HazelGrant / es6-vue-stopwatch-component.vue
Last active October 17, 2018 13:47
ES6 Vue Stopwatch Component
<template>
<div>
<div id='stopwatch'>
{{ displayHours }}:{{ displayMinutes }}:{{ displaySeconds }}
</div>
<button @click="start">Start</button>
<button @click="stop">Stop</button>
<button @click="clear">Clear</button>
</div>
</template>
@HazelGrant
HazelGrant / test_thoughts.md
Last active September 9, 2016 18:45
thoughts on testing for work
title
Testing Thoughts

Internal Guidelines

Basics

Generally we use Minitest. We still need some familiarity with Rspec because we inherit some legacy projects which use it. Matt, on why we use Minitest:

@HazelGrant
HazelGrant / gist:6860bfdea066a77ce1d8
Created April 8, 2015 17:44
Problem with SVG Path

I am working with a WrapBootstrap template, called Restart, in a Rails 4 application, which has a portfolio page where, when you hover over an item (which is a picture), a little gray box with a slanted bottom drops down over the picture with some text.

Here's an item, as-is:

{<1>}

And here's an item when you hover over it with a mouse:

{<2>}

The code I have:

<section class="portfolio_strict">
  <div class="row isotope_portfolio_container">
    <div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
      <div class="portfolio_item">
        <a href="http://confreaks.tv/videos/osoa2013-running-cloud-foundry-on-openstack" target="_blank" data-path-hover="M 180,190 0,158 0,0 180,0 z">
          <figure style="background-image: url(<%= asset_path('running-cloud-foundry-on-openstack.png') %>)">
            <svg viewBox="0 0 180 320" preserveAspectRatio="none">
@HazelGrant
HazelGrant / gist:b2686a149c793bea82a3
Last active August 29, 2015 14:10
Javascript/asset pipeline problem with Confreaks.tv

Hello!

My problem is that Bootstrap's dropdown toggle menu has stopped working in the header of Confreaks.TV. I've built a lot of this project learning as I go, without a lot of familiarity with the tools I'm using. The asset pipeline has been particularly frustrating to me. Basically, everything is tangled and messy. I've learned a lot about it since starting the project, but I'm still stumbling around fairly blind. I can grant you access to the private bitbucket repo or provide more information if I haven't provided enough context for the problem here.

The Problem

To start, the dropdown toggle is used in the site's header:

- if user_signed_in?

%li.dropdown

The views for Confreaks.TV are quickly becoming madness.

|--views
|  --admin
|  |--admin
|  |  --index.html.haml
|  |--conferences
|  |  --full index/show/new/edit/_form
| |--events