Skip to content

Instantly share code, notes, and snippets.

View ccabanero's full-sized avatar

Clint Cabanero ccabanero

View GitHub Profile
@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 - Notes for deploying TileStream on an AWS EC2 Ubuntu 12.04.2 Server
Last active December 4, 2020 10:15
TileStream - Notes for deploying TileStream on an AWS EC2 Ubuntu 12.04.2 Server
------------------------------------------------------------------------------------------------------------------------------
DESCRIPTION:
Notes for deploying TileStream on an AWS EC2 Ubuntu 12.04.2 Server for development. Includes workflow for creating
a local tile cache with TileMill, connecting to your Ubuntu EC2 server via SSH using Mac OSX Terminal, and uploading
your tiles (.mbtiles) to your TileStream server.
REFERENCES:
TileStream git repo: https://github.com/mapbox/tilestream
-----------------------------------------------------------------------------------------------------------------------------
@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 / AWS - Notes for installing Apache - PostgreSQL - PostGIS - PHP (LAPPP) on an AWS EC2 Ubuntu 12.04.2 Server for development.
Last active September 23, 2021 05:32
AWS - Notes for installing Apache - PostgreSQL - PostGIS - PHP (LAPPP) on an AWS EC2 Ubuntu 12.04.2 Server for development.
-------------------------------------------------------------------------------------------------------------------------------
DESCRIPTION:
Notes for installing Apache - PostgreSQL - PostGIS - PHP (LAPPP) on an AWS EC2 Ubuntu 16.x Server for development.
-------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------
PART 1: Stand Up an Ubuntu 16.x server on AWS EC2
---------------------------------------------------------
@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 / Android - using LocationListener with Google Maps v2
Last active April 7, 2022 13:57
Android - using LocationListener with Google Maps v2
import com.google.android.gms.maps.CameraUpdate;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.GoogleMap.OnMapClickListener;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
import android.app.Activity;
import android.content.Context;
@ccabanero
ccabanero / Android - invoking the camera app with an Intent
Last active February 25, 2016 12:13
Android - invoking the camera app with an Intent
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.provider.MediaStore;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
@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
@ccabanero
ccabanero / PHP repair after Mavericks upgrade
Last active December 29, 2015 01:09
PHP repair after Mac OSX Mavericks upgrade
// IF OS NEVER HAD A SITES FOLDER PREVIOUSLY
//in terminal
sudo apachectl start
//open browser and check local host --> it works
//at the root of the user, create a 'Sites' folder
//in terminal ... replace [username] with the user name you use to log in to your Mac OS X