This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# ./.git/hooks/pre-commit | |
.git/hooks/pre-commit-format-javascript | |
.git/hooks/pre-commit-format-ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Assumptions: | |
# - Clean working tree. | |
# - Tags are used exclusively to tag deploys | |
git checkout master | |
git branch -D staging # Delete staging branch locally. | |
git push origin :staging # Delete staging branch from GitHub. | |
git checkout -b staging `git describe --abbrev=0 --tags` # create staging from the latest deployed tag. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- | |
This is hypothetical markup for HTML based feeds. | |
Riffing on the ideas shared at https://blog.jim-nielsen.com/2024/rss-in-html/ | |
--> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Dan Ott's HTML Feed</title> | |
<!-- Tell the machines that there's an HTML feed available at /feed.html --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HtmlRenderingTest < Minitest::Test | |
CRUST = <<~HTML.strip | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title><server-side-slot name="title"><%= title %></server-side-slot></title> | |
<server-side-slot name="head"></server-side-slot> | |
<% meta.each do |name, content| %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* json_storage.js | |
* @danott | |
* 26 APR 2011 | |
* | |
* Building on a thread from Stack Overflow, override localStorage and sessionStorage's | |
* getter and setter functions to allow for storing objects and arrays. | |
* | |
* Original thread: | |
* http://stackoverflow.com/questions/2010892/storing-objects-in-html5-localstorage | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* youversion_abbreviations.js | |
* JSON of YouVersion.com Bible Book URL Abbreviations. | |
*/ | |
var books = { | |
'gen': 'Genesis', | |
'exo': 'Exodus', | |
'lev': 'Leviticus', | |
'num': 'Numbers', | |
'deu': 'Deuteronomy', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* modernizr-test.js | |
* Daniel Ott | |
* 3 March 2011 | |
* Custom Tests using Modernizr's addTest API | |
*/ | |
/* iOS | |
* There may be times when we need a quick way to reference whether iOS is in play or not. | |
* While a primative means, will be helpful for that. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Origin: http://snipplr.com/view/4912/relative-time/ | |
Copied here for my reference | |
*/ | |
function plural($num) { | |
if ($num != 1) | |
return "s"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'repeatable', "= 1.0.0" | |
end | |
weekdays = Repeatable::Expression::Union.new( | |
Repeatable::Expression::Weekday.new(weekday: 1), | |
Repeatable::Expression::Weekday.new(weekday: 2), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Daniel Ott | |
* entities.css | |
* 31 January 2011 | |
* | |
* Adding arrows to thinks makes them more clickable. Right? | |
* Use CSS's :after pseudo-selector to insert hexadecimal values | |
* of html entities into the document. Less markup. More awesome. | |
*/ | |
.add-an-arrow:after { |
NewerOlder