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
// ---- | |
// Sass (v3.3.4) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
@mixin some-color-name($color) { | |
@if type-of($color) == 'map' { | |
background-image: linear-gradient(map-get($color, key1), map-get($color, key2)); | |
} | |
} |
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 element-background($color, $direction: top) { | |
@if type-of($color) == list { | |
background-color: nth($color, 1); | |
@include background-image(linear-gradient($direction, $color)); | |
} | |
else { | |
@if ($color != 'none') { | |
$percent: alpha($color) * 100%; | |
$opaque: opacify($color, 1); | |
$solid-color: mix($opaque, white, $percent); |
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 | |
/** | |
* Helper function. | |
* | |
* Prepares the necessary array for use with theme_picture. | |
* | |
* @param array $variables | |
* The image array loaded from field_get_items. | |
* | |
* @param string $group |
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
adb pull /system/etc/hosts /tmp/hosts | |
echo "192.168.57.1 test.example.com" >> /tmp/hosts | |
adb remount | |
adb push /tmp/hosts /system/etc |
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 | |
function modulename_form_alter(&$form, $form_state, $form_id) { | |
switch ( $form_id ) { | |
case 'uc_cart_view_form': | |
/* | |
* This is how you can remove the "remove" | |
* button for each item. | |
*/ | |
foreach($form['items'] as $k => $v ) { | |
if(is_integer($k) && isset($v['remove'])) { |
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 | |
/* | |
* This gist utilizes Yahoo's Weather API to snag the current | |
* weather conditions for any country given it's WOEID. | |
* | |
* - by Carwin Young | |
*/ | |
/* Set up some location WOEIDs */ | |
$Cambodia = 1020985; /* Phnom Pneh */ |
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 | |
function yourmodule_custom_form($form, &$form_state, $term) { | |
/* Note: rather than passing a $term var, you could use arg(2) from the url */ | |
drupal_set_title('Your Label: ' . ucwords($term)); | |
// or | |
drupal_set_title('Your Label: ' . str_replace('%20',' ', arg(2))); | |
/* Make life easier: */ | |
$school = ucwords($term); |
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
☎ - ☎ ☎ | |
☂ - ☂ ☂ | |
☑ - ☑ ☑ | |
☒ - ☒ ☒ | |
☐ - ☐ ☐ | |
☁ - ☁ ☁ | |
⌘ - ⌘ ⌘ | |
♻ - ♻ ♻ | |
⊕ | |
� |
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 ($) { | |
Drupal.behaviors.themename = { | |
attach: function(context, settings) { | |
// Add a hover class to nav items. | |
$('.mainnav nav a') | |
.hover( | |
function() { | |
$(this).addClass('hover'); | |
}, | |
function() { |
OlderNewer