Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠

Trey Piepmeier trey

🏠
View GitHub Profile
@trey
trey / styles.less
Last active Aug 29, 2015
My Atom Styles
View styles.less
/*
* 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 Aug 29, 2015
Smarter Sass Media Queries
View smarter-sass-media-queries.md

_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 Aug 29, 2015
HTML5 email input type.
View email-input.md

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.

View keybase.md

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:

View extend-vs-mixin.md

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.

View Comcis.md

Comics Wishlist

The Maxx

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

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
View snark.md

Oh good, another social network.

@trey
trey / Capfile
Created Jul 24, 2008
Capistrano, Ubuntu, Django
View Capfile
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 Jul 24, 2008
Basic VirtualHosts information for serving Django projects using Apache and mod_python.
View django-vhost.conf
<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/