It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
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
:root { | |
--violation-color: red; /* used for clear issues */ | |
--warning-color: orange; /* used for potential issues we should look into */ | |
} | |
/* IMAGES */ | |
/* | |
* Lazy-Loaded Images Check | |
* ==== |
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> | |
<title>Glimmer Demo</title> | |
</head> | |
<body> | |
<script src="./app.bundle.js"></script> | |
<example-app /> | |
</body> | |
</html> |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
This is a quick tutorial explaining how to get a static website hosted on Heroku.
Why do this?
Heroku hosts apps on the internet, not static websites. To get it to run your static portfolio, personal blog, etc., you need to trick Heroku into thinking your website is a PHP app. This 6-step tutorial will teach you how.
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
// ==UserScript== | |
// @name Tweaks for greaterthanorequalto.net | |
// @namespace http://github.com/neetij | |
// @version 0.1 | |
// @description Triggers the portfolio links. | |
// @match http://greaterthanorequalto.net/* | |
// @copyright 2014+, Neetij | |
// ==/UserScript== | |
/* Hastily put together, but functional. Fork and improve.*/ |
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
require 'nokogiri' | |
namespace :ember_cli_rails do | |
desc "compile ember and update application.html.erb with ENV vars" | |
task :build => [:ember, :update_env] do | |
end | |
desc 'Build ember app and copies css and js files to rails' |
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
#ruby '2.1.0' | |
source 'https://rubygems.org' | |
gem 'rack', '~>1.5.2' | |
gem 'actionpack', '~> 4.1.0.beta1' | |
gem 'railties', '~> 4.1.0.beta1' |
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 ajax(url, options) { | |
return new Ember.RSVP.Promise(function (resolve, reject) { | |
options = options || {}; | |
options.url = url; | |
options.success = function (data) { | |
Ember.run(null, resolve, data); | |
}; | |
options.error = 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
#!/bin/zsh | |
# | |
# Highlight a given file and copy it as RTF. | |
# | |
# Simon Olofsson <[email protected]> | |
# | |
set -o errexit | |
set -o nounset |
NewerOlder