Skip to content

Instantly share code, notes, and snippets.

View xenotropic's full-sized avatar

Joseph Morris xenotropic

View GitHub Profile
@amboutwe
amboutwe / yoast_seo_admin_remove_columns.php
Last active February 1, 2024 16:37
Remove Yoast SEO columns from posts and pages
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Remove Yoast SEO Columns
* Credit: Andrew Norcross http://andrewnorcross.com/
* Last Tested: Jun 09 2020 using Yoast SEO 14.3 on WordPress 5.4.1
*
* If you have custom post types, you can add additional lines in this format
* add_filter( 'manage_edit-{$post_type}_columns', 'yoast_seo_admin_remove_columns', 10, 1 );
* replacing {$post_type} with the name of the custom post type.
@vsoch
vsoch / index.php
Last active February 15, 2024 05:20
Generate RSS feed for files in a directory folder. Put this file in a folder with files, modify the $allowed_ext variable to customize your extensions, and $feedName, $feedDesc, $feedURL, and $feedBaseURL. Then navigate to the folder on the web to see the xml feed. Done!
<?php
header('Content-type: text/xml');
/*
Runs from a directory containing files to provide an
RSS 2.0 feed that contains the list and modification times for all the
files.
*/
$feedName = "My Audio Feed";
$feedDesc = "Feed for the my audio files in some server folder";
@bmcbride
bmcbride / postgis_geojson.php
Created February 26, 2012 05:43
PHP PostGIS to GeoJSON
<?php
/**
* PostGIS to GeoJSON
* Query a PostGIS table or view and return the results in GeoJSON format, suitable for use in OpenLayers, Leaflet, etc.
*
* @param string $geotable The PostGIS layer name *REQUIRED*
* @param string $geomfield The PostGIS geometry field *REQUIRED*
* @param string $srid The SRID of the returned GeoJSON *OPTIONAL (If omitted, EPSG: 4326 will be used)*
* @param string $fields Fields to be returned *OPTIONAL (If omitted, all fields will be returned)* NOTE- Uppercase field names should be wrapped in double quotes
* @param string $parameters SQL WHERE clause parameters *OPTIONAL*