Skip to content

Instantly share code, notes, and snippets.

View dbox's full-sized avatar

Daniel Box dbox

View GitHub Profile
@dbox
dbox / .htaccess
Created June 6, 2015 02:55
.htaccess URL rewrites
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
@dbox
dbox / proxy-images.md
Last active August 29, 2015 14:22
Proxy Image requirements

Headshots

  • Ideally 570x570 for retina support
  • Minimum 285x285 - last resort if we're scraping from web - won't be retina
  • Square Crops preffered
  • Save as full quality jpeg

Hero image

  • ideal: 2560 x 1240
  • ideal image ratio: 2x width to 1x height
  • Minimum width: 1200
@dbox
dbox / rrssb-folder-structure.md
Last active August 29, 2015 14:22
rrssb 2.0
├── dist/
|   ├── css/
|   |   └── rrssb.min.css
|   ├── images/ 
|   |   └── facebook.min.svg  etc etc
|   ├── js/
|   |   └── vendor/
|   |   |   └── jquery.1.10.2.min.js
| | | └── modernizr-2.6.2-respond-1.1.0.min.js
@dbox
dbox / gist:7ad726f775112d181e9d
Last active August 29, 2015 14:19
cove htaccess
Options -Multiviews
RewriteEngine On
RewriteBase /
# 404 page
ErrorDocument 404 404.html
# Clean URLs
RewriteRule ^apartments$ /apartments.html [L]
// Headings
// –––––––––––––––––––––––––––––––––––––––––––
h1, h2, h3, h4, h5, h6
display block
margin 1rem 0
font-weight normal
// Remove the margin-top on all :first-child headers
// as the padding on the parent *almost* always makes up for it
&:first-child
// Variables
// ––––––––––––––––––––––––––––––––––––––––––––––––
$base-font-size = 16px
$global-border-radius = 4px
//
// REM Calculator
//
// Calculates and returns the REM value based on PX input
@dbox
dbox / gist:4d04c1287931fc9e0076
Created November 19, 2014 16:03
// Freaking easy responsive rows of items by @chriscoyier
// Freaking easy responsive rows of items by @chriscoyier (http://css-tricks.com/video-screencasts/132-quick-useful-case-sass-math-mixins/)
@mixin rowMachine($numPerRow, $margin) {
width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow);
&:nth-child(n) {
margin-bottom: $margin;
margin-right: $margin;
}
&:nth-child(#{$numPerRow}n) {
margin-right: 0;
@dbox
dbox / rrssb-href
Last active August 29, 2015 14:06
Href for RRSSB
<!-- Replace with your URL. For best results, make sure you page has the proper FB Open Graph tags in header:
https://developers.facebook.com/docs/opengraph/howtos/maximizing-distribution-media-content/ -->
<a href="https://www.facebook.com/sharer/sharer.php?u=http://yoururlhere.com" class="popup">
<script>
//required for .cust
$(document).ready(function(){
$('a.cust').on('click',function(){
var newHref = $(this).attr('href');
newHref=newHref.replace("/",".html");
//alert(newHref);
$(this).attr('href',newHref);
});
});
@dbox
dbox / slack flatland theme
Created August 8, 2014 22:00
Slack Flatland Theme
#313437,#26292C,#2095F0,#FFFFFF,#2F4251,#D4D4D5,#7298A6,#E75933
based on:
https://github.com/thinkpixellab/flatland