most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta http-equiv="content-language" content="en" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
/** | |
* Plugin: jquery.zRSSFeed | |
* |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
// Simple, single configuration file to override almost all paths and server settings. As used by @airways | |
// and @litzinger. | |
// Only check in the default as dist.config.php, set your version control system to ignore config.php so that | |
// local users and each instance (staging, production) can have their own settings. | |
// These config files are mainly meant to be used on a shared development server used by all developers, | |
// although it works almost as well for local development as well. |
<html> | |
<head> | |
<link rel="stylesheet" href="lib/leaflet.css" /> | |
<!--[if lte IE 8]> | |
<link rel="stylesheet" href="lib/leaflet.ie.css" /> | |
<![endif]--> | |
</head> | |
<body> | |
<div id="map" style="width:1004px; height:748px; border: 1px solid black;"></div> | |
<script type="text/javascript" src="lib/leaflet-src.js"></script> |
// _decimal.scss | MIT License | gist.github.com/terkel/4373420 | |
// Round a number to specified digits. | |
// | |
// @param {Number} $number A number to round | |
// @param {Number} [$digits:0] Digits to output | |
// @param {String} [$mode:round] (round|ceil|floor) How to round a number | |
// @return {Number} A rounded number | |
// @example | |
// decimal-round(0.333) => 0 |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
/* Sass Mixin that generates a Baseline Grid */ | |
/* by: Mike Morrison, Soholaunch.com */ | |
/* You don't have to leave this credit comment in, but it would be nice of you. */ | |
// Set your grid dimensions here | |
$body-width: 960px; | |
$baseline: 22px; | |
@mixin baseline-grid { | |
$columns: 16; | |
$column-color: rgba(200,0,0,.2); |
(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(/;(?![A-Za-z0-9])/); | |
for(var i = 0; i < styles.length; i++) { | |
if(!!styles[i] === false) continue; | |
var pair = styles[i].split(": "); |
/* | |
Simple example of a dropdown menu using HTML5 LocalStorage. | |
*/ | |
function create_dropdown(menu_id, category_title_class) { | |
var menu = document.getElementById(menu_id) | |
var ctitles = menu.getElementsByClassName('category_title') | |
for (var i = 0; i < ctitles.length; i++) { | |
var ctitle = ctitles[i] | |
apply_shown(ctitle, is_shown(ctitle)) |
A list of Sketch plugins hosted at GitHub, in no particular order.