Skip to content

Instantly share code, notes, and snippets.

View danott's full-sized avatar
📈
Chart with upward trend

Dan Ott danott

📈
Chart with upward trend
View GitHub Profile
@danott
danott / ee_plugin_template.php
Created November 7, 2010 05:31
A template for EE plugins
<?php
/*!
* Plugin Template ExpressionEngine Plugin v1.0
*
* Provides a simple framework for developing EE plugins.
*
* Copyright 2010, Daniel Ott
* Dual licensed under the MIT or GPL Version 2 licenses.
*/
@danott
danott / font-stacks.css
Created November 21, 2010 16:25
A collection of nice font stacks.
.fs-garamond {
font-family: Garamond, Baskerville, "Baskerville Old Face", "Hoefler Text", "Times New Roman", serif;
}
.fs-lucida-bright {
font-family: "Lucida Bright", Georgia, serif;
}
.fs-palatino {
font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
@danott
danott / entities.php
Created December 21, 2010 14:17
Sometimes I want to find random entities to use in HTML.
<!doctype html>
<html>
<head>
</head>
<body>
<p>
<?php
$low_bound = 13312;
$high_bound = 20000;
for($i=13312;$i<16612;$i++)
@danott
danott / entities.css
Created January 31, 2011 22:07
Use CSS's :after pseudo-selector to insert hexadecimal values of html entities into the document. Less markup. More awesome.
/* 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 {
@danott
danott / media-queries.css
Created February 21, 2011 15:44
Target specific touch devices with media queries.
@media only screen and (max-width: 999px) {
/* rules that only apply for canvases narrower than 1000px */
}
@media only screen and (device-width: 768px) and (orientation: landscape) {
/* rules for iPad in landscape orientation */
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* iPhone, Android rules here */
@danott
danott / jquery.scroll-lock.js
Created February 21, 2011 21:22
Apple Cart style scroll lock
We couldn’t find that file to show.
<?php
make_embed_params_tag_params()
{
// the valid params for the tag
$valid_params = array(
'entry_id',
'weblog_id',
'url_title'
);
@danott
danott / modernizr-tests.js
Created March 4, 2011 16:55
Custom Modernizr tests that are useful.
/* 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.
*/
@danott
danott / simple_args_parsing.sh
Created March 4, 2011 16:59 — forked from jehiah/simple_args_parsing.sh
Simple bash shell arg parsing
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"
@danott
danott / wordpress_category_functions.php
Created April 7, 2011 14:55
As far as I can google, WordPress offers no convenient way for accessing some things I'd like to use.
<?php
// Utilize wordpress' get_queried_object to get the details necessary.
function current_category_ID()
{
$category = get_queried_object();
return $category->term_id;
}
// Boolean: Does this category have child categories.