Skip to content

Instantly share code, notes, and snippets.

View ccabanero's full-sized avatar

Clint Cabanero ccabanero

View GitHub Profile
@ccabanero
ccabanero / AWS - S3 PublicRead Bucket Policy
Created January 30, 2014 13:37
AWS - S3 PublicRead Bucket Policy
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
@ccabanero
ccabanero / Installing SASS - Ubuntu 12
Created February 5, 2014 18:40
Installing SASS - Ubuntu 12
--installing ruby
sudo apt-get install ruby-full build-essential
--installing rubygems
sudo apt-get install rubygems
--install sass
sudo gem install sass
@ccabanero
ccabanero / Swift Reference
Created June 3, 2014 13:15
Swift Reference
import UIKit
// variable
var myVariable = 3
myVariable += 1
@ccabanero
ccabanero / ios-healthkit-healthstore-objc
Last active August 29, 2015 14:07
Setting up a Health Store with Authorization from User
#import "ViewController.h"
#import <HealthKit/HealthKit.h>
@interface ViewController ()
@property (nonatomic, strong) HKHealthStore *healthStore;
@end
@ccabanero
ccabanero / remove uitableviewcell indentation
Created October 16, 2015 10:36
remove uitableviewcell indentation
// For removing the separator line indentation from a UITableViewCell
override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {
if(tableView.respondsToSelector("setSeparatorInset:")) {
tableView.separatorInset = UIEdgeInsetsZero
}
if(tableView.respondsToSelector("setLayoutMargins:")) {
tableView.layoutMargins = UIEdgeInsetsZero
}
@ccabanero
ccabanero / ArcGIS for iOS Runtime SDK - Adding Tiled Map Service Layer to Map
Created May 14, 2013 11:46
Test - Adding a Cached/Tiled Map Server layer to an AGSMapView. ArcGIS for iOS Runtime SDK.
- (void)viewDidLoad
{
[super viewDidLoad];
//custom navigation bar
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed: @"customNavImage"] forBarMetrics:UIBarMetricsDefault];
@ccabanero
ccabanero / TileStream - Sample code for adding a TileStream cache to Leaflet
Created September 5, 2013 15:49
TileStream - Sample code for adding a TileStream cache to Leaflet
<html>
<head>
<title>Sample: Adding TileStream cache to Leaflet</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" /><![endif]-->
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script>
$(document).ready(function(){
@ccabanero
ccabanero / CartoCSS - examples so I don't forget
Last active December 23, 2015 01:59
CartoCSS - examples so I don't forget
/*----------------------------------------
Examples for styling POLYGONS
----------------------------------------*/
#countries {
::outline {
line-color: #85c5d3;
line-width: 2;
line-join: round;
}
@ccabanero
ccabanero / iOS - Core Location - sample code
Last active December 23, 2015 02:59
iOS - Core Location - sample code for initializing Core Location and implementing CLLocationManagerDelegate delegate methods.
/*----------------------------------------------------------------------------------------------------------------------------------
Description:
iOS - Core Location - sample code for initializing Core Location and implementing CLLocationManagerDelegate delegate methods.
----------------------------------------------------------------------------------------------------------------------------------*/
//interface file ...
#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
@ccabanero
ccabanero / iOS - Adding TileStream cache to MapKit
Last active December 26, 2015 20:28
iOS - Adding TileStream cache to MapKit
@interface MapViewController()
@property (nonatomic, weak) IBOutlet MKMapView *mapView;
@property (nonatomic, strong) MKTileOverlay *overlay;
@end