Skip to content

Instantly share code, notes, and snippets.

@kaplan
kaplan / middleman_dev_approaches.md
Last active May 12, 2016 11:42
Local development setup approaches for Middleman with Pow or Apache with the Mac OS.

Middleman Local Dev Approaches

Update 03-03-2015
I've moved over to a new MacBookPro running 10.10.2. I think I'm going to leave POW off this machine. I've been trying to use more Vagrant VMs in general, but the Localhost is so fast for just getting something in the browser, especially when testing things out on the front end in the browser. One thing I'm noticing about the 2nd approach is that the build with a vhost works great, but just getting the .git setup was a little tricky. I had to make the main directory, the build directory and git init in each. Then, I added the remotes from the working (development) repository for the source and the staging server repo for the build. Looks like I might install Passenger on this new machine so that I can use a vhost for the source files. Otherwise I need to use the http://0.0.0.0:4567/ or http://localhost:4567/ which isn't a bad thing vs installing Passenger?

Udpate 03-03-2015
Wow, just installed Phusion Passenger in about 15min using the g

@bevacqua
bevacqua / books.md
Last active October 13, 2018 16:52
Books I plan on buying this week

Web Performance

  • High Performance Web Sites: Essential Knowledge for Front-End Engineers
  • High Performance JavaScript (Build Faster Web Application Interfaces)
  • Even Faster Web Sites: Performance Best Practices for Web Developers
  • Designing for Performance: Weighing Aesthetics and Speed

Web Design

  • Adaptive Web Design: Crafting Rich Experiences with Progressive Enhancement (2nd Edition) (Voices That Matter)
@rikschennink
rikschennink / README.md
Last active January 29, 2019 09:44
Sass OO Mixins: OOCSS without the HTML clutter

Sass OO Mixins: OOCSS without the HTML clutter

  • Less HTML clutter (caused by all those fragmented class names).
<button class="btn btn-primary btn-large btn-outline">Buy!</button>
  • Descriptive classes (or no classes at all) in the HTML results in cleaner and easier to read HTML.
Buy!
@AlexanderOMara
AlexanderOMara / index.html
Last active February 19, 2019 22:30
iOS 8 position: fixed; input element workaround
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
<title>iOS 8 position: fixed; input element workaround</title>
<style>
* {
margin: 0;
padding: 0;
@coenjacobs
coenjacobs / wc-attribute-links.php
Created May 4, 2012 14:05
Display WooCommerce product attribute archive links on product page, right below the add to cart button.
@CristinaSolana
CristinaSolana / SCSS Mixin for rem + px fallback on multiple properties and property lists
Last active March 11, 2020 13:54
SCSS Mixin for rem + px fallback on multiple properties and property lists
// Global Vars
$basefontsize: 16 !default;
// Mixins
// input pixel value unitless: 8 vs 8px
// ex. @include rem(padding, 8 12 16 24)
@mixin rem($property, $px: $basefontsize) {
@aarjithn
aarjithn / slidespage.html
Last active March 14, 2020 11:07
Sliding Segments Ionic v2
<ion-toolbar>
<ion-segment [(ngModel)]="selectedSegment" (ionChange)="onSegmentChanged($event)">
<ion-segment-button value="first">
First
</ion-segment-button>
<ion-segment-button value="second">
Second
</ion-segment-button>
<ion-segment-button value="third">
Third
@shaneriley
shaneriley / mixins.jade
Created February 10, 2014 20:10
Jade mixins example
// Writing JS for everything is great and all, but I don't want to see JS
// inline in my Jade templates. Thankfully, there are ways of abstrating it
// into mixins!
// Want some Rails-like helpers?
mixin link_to(name, href)
- href = href || "#"
a(href="#{href}")= name
// How about a single editing point for a class name?
@RemcoWessels
RemcoWessels / wordpress-auto-add-alttext-on-upload.php
Last active January 21, 2022 16:41
WordPress function; As it is important for a11y (accessibility) that images got an ALT text this function adds, on upload, the IPTC description from the image to the "Alternative Text" field within WordPress.
/* Automatically set an image Alt-Text on upload */
add_action( 'add_attachment', 'kreks__add_alt_text_from_image_IPTC_on_upload' );
function kreks__add_alt_text_from_image_IPTC_on_upload( $post_ID ) {
// Check if uploaded file is an image, else do nothing
if ( wp_attachment_is_image( $post_ID ) ) {
$postMeta = get_post_meta($post_ID);
$uploads = wp_get_upload_dir();
$imgURL = $uploads['basedir'] . "/" . $postMeta['_wp_attached_file']['0'];

Gmail Filters

Catch newsletters and junk

Matches: ("opt-out" OR unsubscribe OR "viewing the newsletter" OR "privacy policy" OR enews OR "edit your preferences" OR "email notifications" OR "update profile" OR smartunsubscribe OR secureunsubscribe OR yahoogroups OR "manage your account" OR "group-digests") Do this: Skip Inbox, Apply label "Work/Newsletters"

Keep pesky calendar invites out of inbox

Matches: (subject:("invitation" OR "accepted" OR "rejected" OR "updated" OR "canceled event" OR "declined") when where calendar who organizer) Do this: Skip Inbox, Apply label "GTD/Follow up"

Keep 90% of Sales emails out of Inbox