Skip to content

Instantly share code, notes, and snippets.

View gormus's full-sized avatar
💭
Never be cruel, never be cowardly.

Osman Gormus gormus

💭
Never be cruel, never be cowardly.
View GitHub Profile
@gormus
gormus / gist:7489838
Created November 15, 2013 19:07
Based on the discussion found at foundation issue #1358 https://github.com/zurb/foundation/issues/1358#issuecomment-28546603
$(window).load(function() {
$("[data-match-height]").each(function() {
var parentRow = $(this),
childrenCols = $("> [data-height-watch]", this),
childHeights = childrenCols.map(function(){ return $(this).outerHeight(); }).get(),
tallestChild = Math.max.apply(Math, childHeights);
childrenCols.css('min-height', tallestChild);
});
});
@import url("http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600|Open+Sans+Condensed:300,700");
img {
border: 0;
max-width: 100%;
height: auto;
}
.group-header {
position: relative;
@gormus
gormus / settings.php
Created December 16, 2013 03:23
Redis cache settings for Drupal 7 on Pantheon.
<?php
/**
* Redis cache settings for Pantheon.
*
* http://helpdesk.getpantheon.com/customer/portal/articles/401317
*
* All Pantheon Environments.
*/
if (defined('PANTHEON_ENVIRONMENT')) {
// Use Redis for caching. (mandatory).
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php-fpm
# Install PHP extensions
sudo yum install -y php-devel php-mysql php-pdo \
php-pear php-mbstring php-cli php-odbc \
/*
* Outputs a float representing the iOS version if user is using an iOS browser i.e. iPhone, iPad
* Possible values include:
* 3 - v3.0
* 4.0 - v4.0
* 4.14 - v4.1.4
* false - Not iOS
*/
var iOS = parseFloat(
@gormus
gormus / settings.php
Created September 26, 2014 16:48
Additional configuration options for the Pantheon platform. Append this gist to your project's settings.php and modify as needed.
<?php
/**
* @file
* Drupal site-specific configuration file.
*/
/**
* Redirect to a common domain.
*/
if (isset($_SERVER['PANTHEON_ENVIRONMENT']) && ($_SERVER['PANTHEON_ENVIRONMENT'] == 'live')) {
@gormus
gormus / page.tpl.php
Created November 22, 2014 23:36
How to get the menu tree in Drupal 7? Expanded or not.
<?php print $custom_main_menu; ?>
@gormus
gormus / styles.css
Last active August 29, 2015 14:16 — forked from pburtchaell/styles.css
/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/
L.Composite = L.Class.extend({
includes: L.Mixin.Events,
initialize: function (options) {
// options should include:
// - tileUrl: A URL template for this layer's visible representation
// - tileOptions (optional): Any [config options for the L.TileLayer](http://leafletjs.com/reference.html#tilelayer-options)
// - geojsonUrl: A URL that retrieves GeoJSON data for this layer as a FeatureCollection,
// or a [Github blob API call](http://developer.github.com/v3/git/blobs/#get-a-blob)
// - geojsonOptions (optional): [Config options for the L.GeoJSON layer](http://leafletjs.com/reference.html#geojson-options)
@gormus
gormus / styles.css
Last active August 29, 2015 14:19 — forked from pburtchaell/styles.css
/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/