Skip to content

Instantly share code, notes, and snippets.

View trey's full-sized avatar
🏠
I'd rather be at home

Trey Piepmeier trey

🏠
I'd rather be at home
View GitHub Profile
@trey
trey / styles.less
Last active August 29, 2015 13:56
My Atom Styles
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*/
@trey
trey / smarter-sass-media-queries.md
Last active August 29, 2015 13:57
Smarter Sass Media Queries

_mixins.scss:

$retina-display: '(-webkit-min-device-pixel-ratio: 1.3), (-o-min-device-pixel-ratio: 2.6/2), (min--moz-device-pixel-ratio: 1.3), (min-device-pixel-ratio: 1.3)';

$breakpoints: (
    mobile:   '(max-width: 580px)',
    tablet:   '(min-width: 581px) and (max-width: 890px)',
    notebook: '(min-width: 891px) and (max-width: 1120px)',
 desktop: '(min-width: 1121px) and (max-width: 1400px)',
@trey
trey / email-input.md
Last active August 29, 2015 13:57
HTML5 email input type.

HTML5 Email Input Type

<input type="email">

It's just like a text field, but it does some fancy stuff like not auto-capitalizing and using an email-optimized keyboard on mobile devices.

If you don't want to validate an email address (some browsers will try to do that automatically), just put a novalidate attribute on the form tag.

Keybase proof

I hereby claim:

  • I am trey on github.
  • I am trey (https://keybase.io/trey) on keybase.
  • I have a public key whose fingerprint is 75EE 2AA3 7BD9 6C78 26EA 76EC 7401 8503 F814 1576

To claim this, I am signing this object:

From Sass for Web Designers:

Where a mixin will write the same rules in each declaration it’s called from, @extend will create multiple, comma-separated selectors for shared styles. It’s good to keep that difference in mind when you’re debating which to use

Also remember that @extend is to apply the same rules to different elements while a @mixin can do that plus act as a function that you can pass arguments to. Cedarholm's opinion is that you shoud consider what the CSS output will look like when determining which one to use.

@trey
trey / Comcis.md
Last active August 29, 2015 14:01

Comics Wishlist

The Maxx

  • 7
  • 8
  • 30
  • 31
  • 32
  • 33
@trey
trey / backbone-marionette-data.md
Last active August 29, 2015 14:03
Backbone / Marionette Data Structure

I wrote this quick overview down so that I could keep things straight in my head as I'm learning Backbone and Marionette.

  • Template
  • Model
  • ItemView
    • Link to Template
  • Collection
    • Link to Model
    • URL to JSON
  • CollectionView
@trey
trey / snark.md
Last active August 29, 2015 14:04
Snark

Oh good, another social network.

@trey
trey / Capfile
Created July 24, 2008 03:58
Capistrano, Ubuntu, Django
set :application, "yoursite_com"
set :user, "you"
set :scm_username, user
set :repository, "git@github.com:#{scm_username}/#{application}.git"
set :deploy_to, "/home/#{user}/public_html/#{application}"
set :scm, :git
set :django_location, "/home/#{user}/sources/django/trunk"
set :django_admin_media, "/django/contrib/admin/media"
set :domain, "example.com"
@trey
trey / django-vhost.conf
Created July 24, 2008 04:10
Basic VirtualHosts information for serving Django projects using Apache and mod_python.
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
# - If you want to serve media files from the same server, you need to
# define `DocumentRoot` and the extra `Location` for the static folder.
# - If you also want to have your media folder inside your Django project,
# a `public/` folder is probably not a bad idea.
DocumentRoot /home/username/public_html/project_name/public/