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
Number.toGrayCode = function(n) { | |
if (n < 0) { | |
throw new RangeError("cannot convert negative numbers to gray code"); | |
} | |
return n ^ (n >>> 1); | |
}; | |
Number.fromGrayCode = function(gn) { | |
if (gn < 0) { | |
throw new RangeError("gray code numbers cannot be negative"); |
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
//** Vertical Rhythm **// | |
// By Chris Eppstein, with adjustments by Eric Meyer | |
// The IE font ratio is a fact of life. Deal with it. | |
!ie_font_ratio = 16px / 100% | |
// The base line height is the basic unit of line hightness. | |
!base_line_height ||= 18px | |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
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> | |
<!-- Helpful things to keep in your <head/> | |
// Brian Blakely, 360i | |
// http://twitter.com/brianblakely/ | |
--> | |
<head> | |
<!-- Disable automatic DNS prefetching. | |
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 | |
/** | |
* Implements hook_html_head_alter(). | |
* - Simplify the meta charset element. | |
*/ | |
function THEMENAME_html_head_alter(&$head_elements) { | |
$head_elements['system_meta_content_type']['#attributes'] = array( | |
'charset' => 'utf-8', | |
); |
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
/* | |
* Property prefix hacks | |
*/ | |
/* IE6 only - any combination of these characters */ | |
_ - £ ¬ ¦ | |
/* IE6/7 only - any combination of these characters */ |
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 | |
/** | |
* Implements hook_html_head_alter(). | |
* | |
* The purpose of this alter function is to modify the contents of the $head | |
* variable which prints in html.tpl.php. This variable is created in | |
* template_process_html() using the function drupal_get_html_head(). Here we | |
* add 2 <meta> tags, 1 <link> tag and simplify the <meta charset />. | |
*/ |
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 | |
/** | |
* Implements template_preprocess_block(). | |
*/ | |
function THEME_preprocess_block(&$vars) { | |
$roles = array( | |
'complementary' => array( | |
'aggregator', | |
'help', |
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
OlderNewer