Skip to content

Instantly share code, notes, and snippets.

View Ethanhackett's full-sized avatar

Ethan Hackett Ethanhackett

  • Ethan Hackett Design
  • New York
View GitHub Profile
@Ethanhackett
Ethanhackett / fontawesome.vue
Last active January 18, 2019 09:53
Font Awesome 5 Pro - Vue.js + Native Script Component
<template>
<Span v-bind:class="classes + ' ' + type" v-bind:text="getIcon()" />
</template>
<script>
/*
Setup:
1. Setup CSS and Font in Native Script App like this:
https://medium.com/@JCAguilera/fontawesome-5-and-nativescript-22653f2b3bac
Thanks > Juanky Aguilera
@Ethanhackett
Ethanhackett / GitFit
Last active June 4, 2020 10:44
GitFit is a Git Hook that randomly selects an Exercise and Reps with an option to challenge a fellow co-worker.
#!/usr/bin/env python
# NAME: GitFit
# AUTHOR: @EthanHackett www.ethanhackett.com
# PURPOSE: Get engineers to be more active by adding exercises to daily git processes.
# INSTALL: Place this file in local git repo in hooks folder .git/hooks/this-file
# NOTES: For more information on Git visit https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
import ctypes # An included library with Python install.
import random # Includes random function for randomly picking Numbers & Exercises,
Ingredients:
2 Cups Whole Milk
4 Cups Heavy Cream
1 Cup Sugar
1 Pinch Salt
3-4 Tbsp Vanilla extract
4 Egg Yokes
Mix It:
1. Put 2 cups of milk into pot. Warm up while constantly sturring until milk is hot enough to disolve sugar.
---
layout: default.hbs
url: '?utm_source=Source&utm_medium=Medium&utm_term=Term&utm_content=Content&utm_campaign=Name'
---
{{> global-header }}
<a href="http://www.domain.com/{{url}}">Click Me</a>
or
<div contenteditable="true" class="editable" data-editable-input-id="input-name"></div>
<input id="input-name" type="text" name="input-name" value="" placeholder="Don't Touch Me" />
$(document).ready(function() {
// Loop through each of the empty .editable elements and add filler edit text.
$('.editable:empty').each(function(){
$(this).text('Edit Me');
});
// On .editable blur() - when a user clicks off of an .editable element take it's text and pass it to the corresponding input.
$('.editable').blur(function() {
var editableContent = $(this).text();