Skip to content

Instantly share code, notes, and snippets.

@rondog
rondog / AddToAny Service Codes
Last active March 12, 2018 19:02
If you are like me, I only wanted to show a few services using AddToAny. Unfortunately there isn't a way to only show certain services. Instead you must exclude them. Here are a list of all the service codes offered by AddToAny as of 2018-03-12
["agregator",
"amazon_wish_list",
"aol_mail",
"balatarin",
"bibsonomy",
"bitty_browser",
"bitty_browser_preview",
"blinklist",
"blogger",
"blogmarks",
@rondog
rondog / index.php
Created October 21, 2016 19:10
Convert TTML captions to a JSON array
<?php
if (isset($_POST['submit'])) {
$total = count($_FILES['captions']['name']);
$zipname = 'json_captions.zip';
$zip = new ZipArchive();
$zip->open($zipname, ZipArchive::CREATE);
for ($i = 0; $i < $total; $i++) {
$contents = file_get_contents($_FILES['captions']['tmp_name'][$i]);
$replaced = preg_replace("/<br\W*?\/>/", " ", $contents);