This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimal-ui"> | |
<title>Title</title> | |
<style> | |
body { | |
-webkit-text-size-adjust: 100%; | |
position: absolute; | |
top: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
'use strict'; | |
var breakpoints = { | |
'(max-width: 30em)' : 's', | |
'(min-width: 30.1em)' : 'm', | |
'(min-width: 48em)' : 'l' | |
}; | |
var events = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var handleMediaQueryMatch = function(mql) { | |
console.log('%s : %s', mql.media, mql.matches); | |
}; | |
var mediaQueryListeners = function() { | |
for(var i = -1, sheets = document.styleSheets, sheet; sheet = sheets[++i];) { | |
for(var j = -1, rules = sheet.cssRules, rule, mql; rule = rules[++j];) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name '*erb' | xargs ruby -e 'ARGV.each { |i| puts "html2haml -r #{i} #{i.sub(/erb$/,"haml")}"}' | bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var CSSCriticalPath=function(w,d,opts){var opt=opts ||{};var css={};var pushCSS=function(r){if(!!css[r.selectorText]===false)css[r.selectorText]={};var styles=r.style.cssText.split(/;(%3F![A-Za-z0-9])/);for(var i=0;i < styles.length;i++){if(!!styles[i]===false)continue;var pair=styles[i].split(": ");pair[0]=pair[0].trim();pair[1]=pair[1].trim();css[r.selectorText][pair[0]]=pair[1];}};var parseTree=function(){var height=w.innerHeight;var walker=d.createTreeWalker(d,NodeFilter.SHOW_ELEMENT,function(node){return NodeFilter.FILTER_ACCEPT;},true);while(walker.nextNode()){var node=walker.currentNode;var rect=node.getBoundingClientRect();if(rect.top < height || opt.scanFullPage){var rules=w.getMatchedCSSRules(node);if(!!rules){for(var r=0;r < rules.length;r++){pushCSS(rules[r]);}}}}};this.generateCSS=function(){var finalCSS="";for(var k in css){finalCSS+=k+" { ";for(var j in css[k]){finalCSS+=j+": "+css[k][j]+"; ";}finalCSS+="}\n";}return finalCSS;};parseTree();};var cp=new CSSCriticalPath(win |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MySingleClassModelAdmin extends ModelAdmin { | |
static $managed_models = array('SiteTree'); | |
static $url_segment = 'mysingleclass'; | |
static $menu_title = 'MySingleClass'; | |
public function getList() { | |
return parent::getList()->filter('MySingleClass'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyModelAdmin extends ModelAdmin { | |
static $managed_models = array( | |
'MyModel', | |
); | |
static $url_segment = 'myurlsegment'; | |
static $menu_title = 'My Model Admin'; | |
// Remove the addButton |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin image-2x($image, $width, $height) { | |
@media (min--moz-device-pixel-ratio: 1.3), | |
(-o-min-device-pixel-ratio: 2.6/2), | |
(-webkit-min-device-pixel-ratio: 1.3), | |
(min-device-pixel-ratio: 1.3), | |
(min-resolution: 1.3dppx) { | |
/* on retina, use image that's scaled by 2 */ | |
background-image: url($image); | |
background-size: $width $height; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.define('FOO.event.publisher.TouchGesture', { | |
override: 'Ext.event.publisher.TouchGesture', | |
onEvent: function(e) { | |
if (FOO.useNativeEvents) { | |
e = e.browserEvent || e; | |
e.preventDefault = function(){}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.define('FOO.dataview.List', { | |
override: 'Ext.dataview.List', | |
// @override - allow emptyText to be a config object | |
updateEmptyText: function(newEmptyText, oldEmptyText) { | |
var me = this, | |
store, | |
defaults = { | |
xtype: 'component', |
NewerOlder