Skip to content

Instantly share code, notes, and snippets.

View ReallyBean's full-sized avatar
🏠
Working from home

ReallyBean

🏠
Working from home
View GitHub Profile
@ReallyBean
ReallyBean / ApacheHTTPSConfig.md
Created December 7, 2020 04:10 — forked from nrollr/ApacheHTTPSConfig.md
Enable SSL in Apache for 'localhost' (OSX, El Capitan)

Enable SSL in Apache (OSX)

The following will guide you through the process of enabling SSL on a Apache webserver

  • The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
  • The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:

@ReallyBean
ReallyBean / function.php
Created August 2, 2018 11:30
Full search including all the custom field in wordpress
/**
* Join posts and postmeta tables
*
* http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_join
*/
function cf_search_join( $join ) {
global $wpdb;
if ( is_search() ) {
$join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';
@ReallyBean
ReallyBean / google-map.php
Created June 19, 2018 09:29
How to show the multiple locations from address using Google Map with laravel
@extends('layouts.app')
@section('content')
<div class="container">
<div id="google-map"></div>
</div>
@endsection
@section('script')
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY"></script>
<script src="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js"></script>