Skip to content

Instantly share code, notes, and snippets.

<snippet>
<content><![CDATA[
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
// LocationServices.h
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
@interface LocationServices : NSObject <CLLocationManagerDelegate> {
CLLocationManager *locationManager;
CLLocation *currentLocation;
@lamguy
lamguy / gist:4614666
Last active December 11, 2015 14:29 — forked from SteffenSr/gist:3944797
UICollectionViewCell glow outline on didSelect
UICollectionViewCell* collectionViewCell = [self.collectionView cellForItemAtIndexPath:indexPath];
collectionViewCell.layer.masksToBounds = NO;
collectionViewCell.layer.cornerRadius = 8; // rounded corners
CGColorRef redColor = [UIColor colorWithRed:1.0 green:0.0
blue:0.0 alpha:1.0].CGColor;
collectionViewCell.layer.shadowColor = redColor;
collectionViewCell.layer.shadowOffset = CGSizeMake(-15, 20);
collectionViewCell.layer.shadowRadius = 5;
collectionViewCell.layer.shadowOpacity = 0.5;
collectionViewCell.layer.shadowOffset = CGSizeMake(10,10);
@lamguy
lamguy / foundation-menu.php
Created December 5, 2012 08:40 — forked from awshout/foundation3-navbar-menu.php
WordPress walker for ZURB's Foundation Nav Bar
add_theme_support('menus');
/*
http://codex.wordpress.org/Function_Reference/register_nav_menus#Examples
*/
register_nav_menus( array(
'main-menu' => 'Main Menu' // registers the menu in the WordPress admin menu editor
) );
@lamguy
lamguy / application.rb
Created October 8, 2012 15:05 — forked from t2/application.rb
Formatting Rails form elements for Twitter Bootstrap error validation
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
html = %(<div class="field_with_errors">#{html_tag}</div>).html_safe
# add nokogiri gem to Gemfile
elements = Nokogiri::HTML::DocumentFragment.parse(html_tag).css "label, input"
elements.each do |e|
if e.node_name.eql? 'label'
html = %(<div class="clearfix error">#{e}</div>).html_safe
elsif e.node_name.eql? 'input'
if instance.error_message.kind_of?(Array)
html = %(<div class="clearfix error">#{html_tag}<span class="help-inline">&nbsp;#{instance.error_message.join(',')}</span></div>).html_safe