Skip to content

Instantly share code, notes, and snippets.

View adammiller's full-sized avatar

Adam Miller adammiller

View GitHub Profile
.sticky-wrap [fw-responsive-table]
table.sticky-enabled
thead
tr.grey
th Order
th Status
th Buyer
th Seller
th Deliverer
th Items

Keybase proof

I hereby claim:

  • I am adammiller on github.
  • I am adammiller (https://keybase.io/adammiller) on keybase.
  • I have a public key whose fingerprint is B2F1 2F27 BAC6 B886 C30E 5052 B135 653A 161E 238C

To claim this, I am signing this object:

define ["underscore", "backbone" ], (_, Backbone) ->
FilteredAttributes =
# Instruct toJSON to use a root node
rootNode: null
# Add attribute names to filteredAttributes to exclude them from JSON
filteredAttributes: []
# Process our JSON, excluding filteredAttributes, and using
# rootNode if present
toJSON: ->
@adammiller
adammiller / session_store.rb
Created December 12, 2013 01:16
If you're sharing sessions between a rails 3.x and 4.x application, this code can be dropped into the rails 4 app to work around the flash message incompatibility.
# We override some fo the Flash code here to ensure our flash messages from this app are written to a different
# session key than the default. This prevents conflicts with our older rails applications
require "rails"
ActionDispatch::Request.class_eval do
def flash
@env["#{Flash::KEY}_four"] ||= Flash::FlashHash.from_session_value(session['flash_4'])
end
end
// Build and update staging
grunt.registerTask("sprite", "Builds sprite sheets from the src imges", function() {
var task = this,
// tell grunt this task is async
done = this.async(),
commands = [
"montage img/_icons_blue/*.png -tile 1x -geometry '100x80>+0+0' -gravity NorthWest -background transparent img/icon_blue_sprite_2x.png",
"montage img/_icons_white/*.png -tile 1x -geometry '100x80>+0+0' -gravity NorthWest -background transparent img/icon_white_sprite_2x.png",
"convert img/icon_white_sprite_2x.png -negate img/icon_black_sprite_2x.png",
"convert img/icon_white_sprite_2x.png -resize 50% img/icon_white_sprite_1x.png",
var a = 1,
b = 2,
c = function() {
var d = 3,
e = function() {
var f = 4;
};
console.log('a = ', a);
console.log('b = ', a);
console.log('d = ', a);
less: {
src: [
SRC_CSS + 'vendor/elements.less',
SRC_CSS + 'ge.vars.less', // NEEDS REMOVED
SRC_CSS + 'ge.mixins.less', // NEEDS REMOVED
SRC_CSS + 'ge.b2b.less',
SRC_CSS + 'ge.footer.less',
SRC_CSS + 'ge.navigation.less'
],
dest: BUILD_CSS + 'ge.base.less'
template: {
b2b: {
src: SRC_TMP + 'b2b.dust',
dest: BUILD_TMP + 'b2b.html',
variables: _.extend( grunt.file.readJSON(SRC_TMP + '../data/common.json'), {preserveWhiteSpace: true})
}
}
@adammiller
adammiller / healthy.js
Created April 23, 2012 20:09
FB init example
define( 'healthy',
['underscore', 'healthy/intro', 'healthy/quiz', 'healthy/results'],
function( _, intro, quiz, results ) {
var Healthy = {
'publicFn': {
'init': function( bodyClass ) {
Healthy.privateFn.setup( bodyClass );
Healthy.privateFn.onFacebookInit( function() {
$( window ).trigger( 'FBInit' );
@adammiller
adammiller / js_fallback_example.html
Created May 19, 2011 02:18
A method for providing fallback content for JS-dependent sites using noscript and feature detection
<!DOCTYPE html>
<html>
<head>
<title>JS Fallback Example</title>
</head>
<body>
<noscript>
<div id="fallback" class="overlay-wrapper">
<div id="fallback-content">
<p>Your browser doesn't support the features used on this site. Please download a more modern browser.</p>