Skip to content

Instantly share code, notes, and snippets.

View ao5357's full-sized avatar
🙂
Probably near my computer, probably something with emails

Brad Czerniak ao5357

🙂
Probably near my computer, probably something with emails
View GitHub Profile
@ao5357
ao5357 / dabblet.css
Created December 16, 2011 14:10
Kottke.org page borders without images
/**
* Kottke.org page borders without images
*/
box-shadow:0 0 0 1px #BFECF7,0 0 0 5px #C5F4FF,0 0 0 6px #88E2F7,0 0 0 10px #8CE9FF,0 0 0 11px #50D8F7,0 0 0 15px #53DFFF,0 0 0 16px #18CDF7,0 0 0 20px #19D4FF;
margin:20px;
padding:20px;
min-height:-moz-calc(100% - 80px);
@ao5357
ao5357 / Flight_of_Fancy_Feast.txt
Created March 31, 2012 23:32
Early incomplete draft of meat ethics essay
Speciesism, as commonly considered, is inherently speciesist; we differentiate ourselves as reasoned beings and see ‘sentient’ species as superior to others based on a murky bioethics. The sociobiological context surrounding our own aged, though, provides a lens for the human ethology that justifies our omnivorous streak. To illustrate this, let us take a clichéd flight of fancy:
You, a vegan brand of heterotroph, walk hungrily-yet-idyllically in the woods. Your eye lands on a fawn getting a drink at a stream. Suddenly, the wind gusts heavily; this violent action alarms the deer. Perhaps due to uncontrollable fright or a heart defect, the animal keels over.
That’s unfortunate for the deer, but perhaps more so for you. You’re left with a moral quandary: is it okay to eat this would-be-fortuitous food source? After all, the common justifications don’t apply. The fawn may never have suffered, in life or death, at the hands of man. And if you decide to pass and eat flora instead, the deer’s body will naturally
@ao5357
ao5357 / dabblet.css
Created May 18, 2012 14:42
Kottke.org page borders without images
/**
* Kottke.org page borders without images
*/
box-shadow:0 0 0 1px #BFECF7,0 0 0 5px #C5F4FF,0 0 0 6px #88E2F7,0 0 0 10px #8CE9FF,0 0 0 11px #50D8F7,0 0 0 15px #53DFFF,0 0 0 16px #18CDF7,0 0 0 20px #19D4FF;
margin:20px;
padding:20px;
min-height:-moz-calc(100% - 80px);
@ao5357
ao5357 / jsonodes.info
Created June 12, 2012 23:16
Nodes as json, etc. in D6
name = JSON Nodes
description = Lets you print nodes as json for ctools, or some other formats
dependencies[] = ctools
package = Chaos tool suite
core = 6.x
@ao5357
ao5357 / mailAgenda.gs
Last active May 12, 2023 00:09
Google Calendar will send you a daily agenda, but it's at 5:00 AM the day of. This agenda macro (in Google Apps Script) lets you trigger an agenda email to any address on any time interval.
/**
* Gets tomorrow's events and sends along an email agenda.
*/
function mailAgenda(){
// Configs.
var config = {
firstName: 'Brad',
email: 'brad@commercialprogression.com',
ignoreRecurringEvents: true
};
@ao5357
ao5357 / compro_hook_menu_items.csv
Created December 6, 2013 15:18
The 1864 menu items used to tabulate the data for a [Commercial Progression blog post](http://www.reddit.com/r/drupal/comments/1s6rbn/hook_menu_more_than_you_ever_needed_to_know/).
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 34 columns, instead of 2. in line 4.
module,path,# path arguments,# wildcards in path,named wildcards,title,title length,title callback declared,# title arguments,non-wildcard title args,description,descript length,page callback,# page callback args,non-wildcard args,delivery callback,access callback,# access args,non-wildcard args,theme callback,# theme args,non-wildcard args,file,file path,load arguments,weight,menu name,expanded,context,tab parent,tab root,position,type,options
subscriptions,SUBSCRIPTIONS_CONFIG_PATH/userdefaults/settings,3,0,0,Overview,8,0,0,0,,0,,0,0,,,0,0,,0,0,,,0,-100,,0,,,,,MENU_DEFAULT_LOCAL_TASK,0
subscriptions,SUBSCRIPTIONS_CONFIG_PATH/userdefaults/bulk,3,0,0,Bulk operation,14,0,0,0,,0,drupal_get_form,1,1,,_subscriptions_bulk_access,0,0,,0,0,subscriptions.admin.inc,,0,-80,,0,,,,,MENU_LOCAL_TASK,0
system,admin/reports/status,3,0,0,Status report,13,0,0,0,Get a status report about your site's operation and any detected problems.,74,system_status,0,0,,,1,1,,0,0,system.admin.inc,,0,-60,,0,,,,,,0
update,admin/reports/update
@ao5357
ao5357 / keybase.md
Created June 16, 2014 19:07
Keybase Verification

Keybase proof

I hereby claim:

  • I am ao5357 on github.
  • I am ao5357 (https://keybase.io/ao5357) on keybase.
  • I have a public key whose fingerprint is 3CE2 D684 D9BD B336 F9F0 5D3E E7F6 BE9A 05D1 4776

To claim this, I am signing this object:

Card grid ('-' * 9) A flexbox grid system with a float fallback. Easy classes to apply for the intended layout.

A Pen by Brad Czerniak on CodePen.

License.

@ao5357
ao5357 / about.md
Last active January 13, 2017 02:11
font-face declarations for all weights, styles, and stretches

'Fun' CSS @font-face facts:

If you ignore the font-variant property (as it adds nearly infinite combinations), then there are 243 @font-face declarations you can make to a single font-family name/ident (9 font-stretch, 9 font-weight, 3 font-style).

Allowing for a more-than-bulletproof dec that includes filetypes you don't need (eot, svg, ttf, woff, woff2) and their respective 'average' sizes in kb (28, 150, 215, 25, 20), the src file payload for that many declarations would be ≈105 MB across 1215 files.

Surprisingly, the HTML needed to display all 243 variants can come in under 10 kb sans compression. The necessary CSS is less than 40 kb.

[This gist does not contain demo fonts]

@ao5357
ao5357 / ga-anchor-events.js
Created January 26, 2018 14:16
GA Event for anchors in jQuery 1.7+
var $body = jQuery('body');
$body.on('click', 'a', function() {
var $this = $(this),
thisHref = $this.attr('href');
if (thisHref.length
&& thisHref.substring(0, 1) === '#'
&& typeof ga === 'function'
) {
ga('send', 'event', {