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
// FacebookSDK | |
// https://developers.facebook.com/docs/plugins/page-plugin/ | |
(function(d, s, id) { | |
var js, fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; | |
js = d.createElement(s); | |
js.id = id; | |
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.8"; | |
fjs.parentNode.insertBefore(js, fjs); | |
}(document, 'script', 'facebook-jssdk')); // Replace 'facebook-jssdk' with your page id. |
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
/* | |
mMap.addMarker(new MarkerOptions() | |
.position(new LatLng(latitude, longitude)) | |
.title("Marker Title") | |
.snippet("Marker snippet") | |
.icon(getBitmapDescriptor(R.drawable.ic_place_black_48dp))); | |
*/ | |
private BitmapDescriptor getBitmapDescriptor(int id) { | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { |
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
package com.msvs.bookshelf.adapters; | |
import android.os.Handler; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ImageView; | |
import android.widget.TextView; |
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
// Alerts | |
@include alert-variant($background, $border, $text-color); | |
// Background Variant | |
@include bg-variant($parent, $color); | |
// Border Radius | |
@include border-top-radius($radius); | |
@include border-right-radius($radius); | |
@include border-bottom-radius($radius); |
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
namespace :db do | |
desc "Find orphaned records. Set DELETE=true to delete any discovered orphans." | |
task :find_orphans => :environment do | |
found = false | |
model_base = Rails.root.join('app/models') | |
Dir[model_base.join('**/*.rb').to_s].each do |filename| | |
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
## | |
# Haversine Distance Calculation | |
# | |
# Accepts two coordinates in the form | |
# of a tuple. I.e. | |
# geo_a Array(Num, Num) | |
# geo_b Array(Num, Num) | |
# miles Boolean | |
# | |
# Returns the distance between these two |