JScript to find album covers that measure less than 1000x1000 px. Perfect for those who like to manage their large music libraries.
(Description) Removing CSS outlines without proper fallbacks can make it impossible to navigate your site with a keyboard.
Use of the rule :focus { outline: none; }
results in the link or control being focusable but with no visible indication of focus for keyboard users. Even worse, methods to remove it such as onfocus="blur()"
result in keyboard users being unable to interact with the link or control.
If you do not like the default focus outline that is displayed when a user clicks on an interactive element, you have 3 accessible solutions:
- Style the outline. Webkit browsers have a more prominent outline so you could try styling it to make it less obtrusive. Consider the use of
a:focus { outline: thin dotted; }
to normalize the look of the outline across browsers.
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 retry(isDone, next) { | |
var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false; | |
var id = window.setInterval( | |
function() { | |
if (isDone()) { | |
window.clearInterval(id); | |
next(is_timeout); | |
} | |
if (current_trial++ > max_retry) { | |
window.clearInterval(id); |
JScript to find broken tracks that iTunes can no longer find. Perfect for those who like to manage their large music libraries.
Page / User State | Logged Out | Logged In |
---|---|---|
/public-page | Go to /public-page | Go to /public-page |
/page-requiring-auth |
|
Go to /page-requiring-auth |
/login |
|
Redirect to / |
/logout | Redirect to / |
|
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
# gem install benchmark-ips | |
require "benchmark/ips" | |
uri = "http://twitter.com/user/statuses/1234567891011121314" | |
Benchmark.ips do |x| | |
x.report("file.basename") { File.basename(uri) } | |
x.report("split('/').last") { uri.split("/").last } |
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
license: gpl-3.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
# gem install benchmark-ips | |
require "benchmark/ips" | |
Benchmark.ips do |x| | |
x.report("range") { (1..100).each { |i| i } } | |
x.report("upto") { 1.upto(100).each { |i| i } } | |
x.report("times plus one") { 100.times { |i| i + 1 } } |
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
license: gpl-3.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
license: gpl-3.0 |
OlderNewer