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
<?php | |
namespace App\Http\Controllers\Admin; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Http\Request; | |
use App\Models\Zipcode; | |
use Illuminate\Support\Facades\DB; | |
class TurfController extends Controller | |
{ |
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
# selenium for web driving | |
import selenium | |
from selenium import webdriver | |
# time for pausing between navigation | |
import time | |
# Datetime for recording time of submission | |
import datetime |
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
const mdColors = [ | |
'#F44336', | |
'#FFEBEE', | |
'#FFCDD2', | |
'#EF9A9A', | |
'#E57373', | |
'#EF5350', | |
'#F44336', | |
'#E53935', | |
'#D32F2F', |
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
<?php | |
/* vars for export */ | |
// database record to be exported | |
$db_record = 'XXX_TABLE_NAME_XXX'; | |
// optional where query | |
$where = 'WHERE 1 ORDER BY 1'; | |
// filename for export | |
$csv_filename = 'db_export_'.$db_record.'_'.date('Y-m-d').'.csv'; | |
// database variables |
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
<?php | |
/* is (lon, lat) inside the polygon $p? | |
* use ray casting algorithm (http://en.wikipedia.org/wiki/Point_in_polygon) | |
* ie. project a horizontal line from our point to each segment | |
* code adapted from http://stackoverflow.com/questions/14149099/raycasting-algorithm-with-gps-coordinates | |
*/ | |
function inside_polygon($test_point, $points) { |
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
var colorArray = ['#FF6633', '#FFB399', '#FF33FF', '#FFFF99', '#00B3E6', | |
'#E6B333', '#3366E6', '#999966', '#99FF99', '#B34D4D', | |
'#80B300', '#809900', '#E6B3B3', '#6680B3', '#66991A', | |
'#FF99E6', '#CCFF1A', '#FF1A66', '#E6331A', '#33FFCC', | |
'#66994D', '#B366CC', '#4D8000', '#B33300', '#CC80CC', | |
'#66664D', '#991AFF', '#E666FF', '#4DB3FF', '#1AB399', | |
'#E666B3', '#33991A', '#CC9999', '#B3B31A', '#00E680', | |
'#4D8066', '#809980', '#E6FF80', '#1AFF33', '#999933', | |
'#FF3380', '#CCCC00', '#66E64D', '#4D80CC', '#9900B3', | |
'#E64D66', '#4DB380', '#FF4D4D', '#99E6E6', '#6666FF']; |
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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |