Skip to content

Instantly share code, notes, and snippets.

@wpconsulate
wpconsulate / gotham.md
Created January 13, 2020 07:51 — forked from mfd/ gotham.md
Gotham font
https://cdn.rawgit.com/mfd/f3d96ec7f0e8f034cc22ea73b3797b59/raw/856f1dbb8d807aabceb80b6d4f94b464df461b3e/gotham.css

<link rel="https://cdn.rawgit.com/mfd/f3d96ec7f0e8f034cc22ea73b3797b59/raw/856f1dbb8d807aabceb80b6d4f94b464df461b3e/gotham.css">

@wpconsulate
wpconsulate / remove-mac-sysfiles.sh
Created September 13, 2019 11:36
Remove Mac System Files __MACOSX or .DS_Store from a folder or Git Repo
#!/bin/bash
# remove __MACOSX foldr and .DS_Store files
# from *_original.zip file
# zip again and place under fixed/*
for x in $*
do
unzip $x
@wpconsulate
wpconsulate / gmap-distance-between-points.js
Created September 11, 2019 08:14
Google Maps V3 JS API to Calculate Distance Between 2 points
var rad = function(x) {
return x * Math.PI / 180;
};
var getDistance = function(p1, p2) {
var R = 6378137; // Earth’s mean radius in meter
var dLat = rad(p2.lat() - p1.lat());
var dLong = rad(p2.lng() - p1.lng());
@wpconsulate
wpconsulate / google-maps-distance-between-2-points.html
Created September 11, 2019 08:12
HTML Example to Calculate Distance Between 2 Points- Google Maps V3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
body
{
font-family: Arial;
font-size: 10pt;
}
$listing = new Listing;
$contact = new Contact;
$listing->status = Input::get('status');
$listing->listingfor = Input::get('listingfor');
$listing->propertystatus = Input::get('propertystatus');
$listing->propertytype = Input::get('propertytype');
$listing->userid = Auth::user()->id;
$listing->reference_id = Input::get('reference_id');
$listing->location = Input::get('location');
$listing->lifestyle = Input::get('lifestyle');
$listing = new Listing;
$contact = new Contact;
$listing->status = Input::get('status');
$listing->listingfor = Input::get('listingfor');
$listing->propertystatus = Input::get('propertystatus');
$listing->propertytype = Input::get('propertytype');
$listing->userid = Auth::user()->id;
$listing->reference_id = Input::get('reference_id');
$listing->location = Input::get('location');
$listing->lifestyle = Input::get('lifestyle');
protected $table = 'listings_specifications';
public function listings()
{
return $this->BelongsTo('listings');
}
protected $table = 'listings';
public function contact()
{
return $this->BelongsTo('contacts');
}
public function specifications()
{
return $this->hasMany('listings_specifications');
}
@wpconsulate
wpconsulate / domain-to-aws-ec2-instance.md
Created October 9, 2018 18:11 — forked from keithweaver/domain-to-aws-ec2-instance.md
Point Domain to Amazon Web Services (AWS) EC2 Instance

Point Domain to Amazon Web Services (AWS) EC2 Instance

  1. Open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.
  2. If you are new to Amazon Route 53, you see a welcome page; choose Get Started Now for DNS Management. Otherwise, choose Hosted Zones in the navigation pane.
  3. Choose Create Hosted Zone.
  4. For Domain Name, type your domain name.
  5. Choose Create.
  6. Click the Hosted Zone, edit record set.
  7. In the value, add ec2-54-152-134-146.compute-1.amazonaws.com.
  8. Change your DNS file to point to the IPv4 address (This would be in something like GoDaddy).
08-13 22:10:24.974 13963-13963/? I/zygote: Late-enabling -Xcheck:jni
08-13 22:10:24.999 13963-13963/? W/zygote: Using default instruction set features for ARM CPU variant (cortex-a9) using conservative defaults
08-13 22:10:25.042 13963-13978/? E/zygote: Failed sending reply to debugger: Broken pipe
08-13 22:10:25.042 13963-13978/? I/zygote: Debugger is no longer active
08-13 22:10:25.681 13963-13963/? W/zygote: /data/app/com.petmeds1800.androidApp-FJnB9eI8_4L-QRZapXI3eg==/split_lib_dependencies_apk.apk has in excess of 100 dex files. Please consider coalescing and shrinking the number to avoid runtime overhead.
08-13 22:10:25.959 13963-13963/? I/MultiDex: VM with version 2.1.0 has multidex support
install
VM has multidex support, MultiDex support library is disabled.
08-13 22:10:26.042 13963-13963/? D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
08-13 22:10:26.052 13963-13963/com.petmeds1800.androidApp W/InstanceID/Rpc: Found 10017