Skip to content

Instantly share code, notes, and snippets.

View ko-n's full-sized avatar
:octocat:

Oleh Kovalenko ko-n

:octocat:
  • N/A
  • Zviahel, Ukraine
  • 01:27 (UTC +03:00)
View GitHub Profile
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 1, 2024 17:49
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@fracasula
fracasula / getMp3StreamTitle.php
Last active April 24, 2024 00:38
How to get the MP3 metadata (StreamTitle) from a streaming URL
<?php
/**
* Please be aware. This gist requires at least PHP 5.4 to run correctly.
* Otherwise consider downgrading the $opts array code to the classic "array" syntax.
*/
function getMp3StreamTitle($streamingUrl, $interval, $offset = 0, $headers = true)
{
$needle = 'StreamTitle=';
$ua = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36';
@mah0001
mah0001 / curl-partial-download.php
Created June 15, 2012 01:23
Partial downloading of files using CURL with PHP
/**
*
* Using CURL to download partial content from a URL
*
* @url file URL to download
* @range_start Start range in bytes
* @range_end End range in bytes
*
*
* example: curl_get_content("http://www.example.org/some-file.zip",100,500)