Skip to content

Instantly share code, notes, and snippets.

View ykessler's full-sized avatar

Yarin Kessler ykessler

  • appgrinders
  • New York City
View GitHub Profile
@ykessler
ykessler / fixed_v.html
Last active August 29, 2015 14:14
Method for vertically-fixed layouts
<html>
<body>
<style>
/* ========= FIXED-V LAYOUT =========
The fixed-v layout method is a pure-css solution to the problem of creating
sidebars and sub-headers that are fixed vertically relative to the screen
(i.e. they don't scroll up/down with the body content), yet move horizontally
@ykessler
ykessler / atomic.css
Last active August 29, 2015 14:10
atomic.css
/*
====================================================================
ATOMIC.CSS
--------------------------------------------------------------------
(NOTE: Load this LAST- should be last word)
Inspired by Thierry Koblentz in "Challenging CSS Best Practices"
(http://www.smashingmagazine.com/2013/10/21/challenging-css-best-practices-atomic-approach/)
- Creates classes for individual styles, letting you position elements with classes in the HTML
@ykessler
ykessler / timezones
Created August 14, 2012 14:50
JSON list of time zones (Based on Olson tz database)
[
{"group":"US (Common)",
"zones":[
{"value":"America/Puerto_Rico","name":"Puerto Rico (Atlantic)"},
{"value":"America/New_York","name":"New York (Eastern)"},
{"value":"America/Chicago","name":"Chicago (Central)"},
{"value":"America/Denver","name":"Denver (Mountain)"},
{"value":"America/Phoenix","name":"Phoenix (MST)"},
{"value":"America/Los_Angeles","name":"Los Angeles (Pacific)"},
{"value":"America/Anchorage","name":"Anchorage (Alaska)"},
@ykessler
ykessler / timezones
Created August 14, 2012 14:49
HTML list of time zones (Based on Olson tz database)
<select name="timezone" >
<option disabled selected style='display:none;'>Time Zone...</option>
<optgroup label="US (Common)">
<option value="America/Puerto_Rico">Puerto Rico (Atlantic)</option>
<option value="America/New_York">New York (Eastern)</option>
<option value="America/Chicago">Chicago (Central)</option>
<option value="America/Denver">Denver (Mountain)</option>
<option value="America/Phoenix">Phoenix (MST)</option>
<option value="America/Los_Angeles">Los Angeles (Pacific)</option>
@ykessler
ykessler / gae_handler.py
Created May 11, 2012 20:23
Python logging handlers
class GAEHandler(logging.Handler):
"""
Logging handler for GAE DataStore
"""
def emit(self, record):
from google.appengine.ext import db
class Log(db.Model):
name = db.StringProperty()