Skip to content

Instantly share code, notes, and snippets.

*
// Seriously, why isn't this just the
// freakin' default in all browsers?
+background-clip(padding-box)
// Not sure what this does? Have a looksie...
// http://compass-style.org/examples/compass/css3/background-clip
// Crucial, if you have rounded corners on something with
// both background color and a border. Without, background
@danielwrobert
danielwrobert / bodyclass.php
Created June 13, 2012 03:40
A simple way to add a body class dynamically by removing the .php extension and echoing the name of the file.
<body class="<?=basename($_SERVER['PHP_SELF'],'.php')?>">
@danielwrobert
danielwrobert / Custom.css
Created July 20, 2012 22:47 — forked from bentruyman/Custom.css
IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Kam Kuo - 2012
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/* and Ben Truyman's Gist:
/* https://gist.github.com/1150520
/*
/* Inspired by Darcy Clarke's blog post:
@danielwrobert
danielwrobert / demo.html
Created October 15, 2012 22:30 — forked from zenlor/demo.html
lazy loader
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - jsFiddle demo</title>
<script type='text/javascript' src='lazyload.js'></script>
<style type='text/css'>

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@danielwrobert
danielwrobert / grunt-setup.md
Last active December 23, 2015 15:49
Getting Started with Grunt.js - Reference

Getting Started with Grunt.js

Setup Process:

  • Install Node & NPM (http://nodejs.org/)
  • Globally install grunt-cli (npm install -g grunt-cli)
  • Move into proj directory and create a package.json file
    • npm init
    • complete steps
    • remove un-needed properties ("main", "scripts", "repository", "license" … whatever you may not wish to include)
  • Install grunt to project (npm install grunt --save-dev)
  • Install any additional desired grunt packages
@danielwrobert
danielwrobert / wcsf-2013.md
Created September 22, 2013 08:09
WordCamp San Francisco 2013 Conference Notes

WordCamp San Francisco 2013

=============================

Session Notes Day 1

Writing Code as User Experience Design

Nikolay Bachiyski

  • Interesting talk about testing your API code to be as dev-friendly as possible (tested/documented/etc.). UX Testing where the developers are the users.

(What’s So Funny ‘Bout) Themes, Love, and Understanding

Ian Stewart (@iandstewart)

@danielwrobert
danielwrobert / facebook-tab-setup.md
Created September 27, 2013 17:19
Notes on setting up a custom Facebook app and installing it as a tab. For Pages only, not for Profiles (as far as I know).

Facebook App & Tab Installation

Create Hosted HTML/CSS/JS Application

  • Develop your app in a max-width 810px container
  • Upload to hosting. If this is a Django project, you can install django-fbapps and create new fbapp. -- To install django-fbapps, follow instructions on Readme.rst file. Additionally, be sure to properly configure path in global urls.py as well as the app-specific urls.py.

Install App in Facebook Developer Admin

  • Create New App -- *If you have not installed any prior applications, you will first need to install the Facebook Developer App
  • Fill in data for 'Basic Info', 'App on Facebook' and 'Page Tab' sections
@danielwrobert
danielwrobert / CSS-Card-Flip.markdown
Last active December 25, 2015 09:39
A Pen by Daniel W. Robert.

CSS Card Flip

CSS card-flip hover effect using CSS 3D Transforms. Fallback hover fade effect for browsers without full support.

A Pen by Daniel W. Robert on CodePen.

License.

@danielwrobert
danielwrobert / image-list-resize.js
Created November 22, 2013 00:31
Resize images in a gallery list that are too tall - adjusts the height and centers accordingly. *** Not complete - TESTING ***
// GALLERY IMAGE RESIZER
var getMaxOfArray = function(numArray) {
return Math.max.apply(null, numArray);
};
var getMinOfArray = function(numArray) {
return Math.min.apply(null, numArray);
};
var galleryImageSize = function(selector) {