Skip to content

Instantly share code, notes, and snippets.

View Ralpharama's full-sized avatar
💭
0s and 1s

Ralph Capper Ralpharama

💭
0s and 1s
View GitHub Profile
@eudesgit
eudesgit / wp-generate-custom-feed-rss.php
Last active August 16, 2023 09:08
How to generate custom RSS on WordPress
<?php
/**
* Generating your own custom RSS feed with custom URL and parameters
*/
/**
* Initialise RSS feed
* @see https://developer.wordpress.org/reference/functions/add_feed/
*/
function init_rss_feed_custom( ) {
@jonathanpeppers
jonathanpeppers / FileImageSourceHandler.cs
Created February 15, 2018 17:15
Magical Xamarin.Forms IImageSourceHandler implementation for Android
using System.Threading;
using System.Threading.Tasks;
using Android.Content;
using Android.Graphics;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: ExportImageSourceHandler(typeof(FileImageSource), typeof(xfperf.FileImageSourceHandler))]
namespace xfperf
@ytkhs
ytkhs / file_post_contents.php
Last active October 14, 2022 09:19
a sample POST method with file_get_contents()
<?php
if (!function_exists('http_post_contents')) {
function http_post_contents($url, $params) {
$content = http_build_query($params, '', '&');
$header = array(
"Content-Type: application/x-www-form-urlencoded",
"Content-Length: ".strlen($content)
);
$options = array(