Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html b:css='false' b:defaultwidgetversion='2' b:layoutsVersion='3' expr:dir='data:blog.languageDirection' expr:lang='data:blog.locale' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'><b:include name='removeattr'/>&lt;!--<head>--&gt;&lt;head&gt;<b:if cond='data:view.isError'><b:include name='redirect'/></b:if>
<!-- responsive and define -->
<meta content='width=device-width, initial-scale=1' name='viewport'/>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
<!-- Chrome, Firefox OS and Opera -->
<meta content='#ffffff' name='theme-color'/>
<!-- Windows Phone -->
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html b:css='false' b:defaultwidgetversion='2' b:layoutsVersion='3' expr:dir='data:blog.languageDirection' expr:lang='data:blog.locale' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'><b:include name='removeattr'/>&lt;!--&lt;head&gt;<b:section id='ElementerMeta' maxwidgets='1' showaddelement='no'>
<b:widget id='Blog3' locked='true' title='Blog Posts' type='Blog' version='2' visible='true'>
<b:widget-settings>
<b:widget-setting name='showDateHeader'>false</b:widget-setting>
<b:widget-setting name='style.textcolor'>#4a85db</b:widget-setting>
<b:widget-setting name='showShareButtons'>true</b:widget-setting>
<b:widget-setting name='showCommentLink'>true</b:widget-setting>
<b:widget-setting name='style.urlcolor'>#bbbbbb</b:widget-setting>
<script type='text/javascript'>
$(document).ready(function() {
function PaginationAjax()
{
$('#pagination').on('click','a',function(e){
e.preventDefault();
var href = $(this).attr('href');
$.ajax({
@riedayme
riedayme / spintax.php
Created June 7, 2022 23:56 — forked from irazasyed/spintax.php
PHP: Text Spinner Class - Nested spinning supported.
<?PHP
/**
* Spintax - A helper class to process Spintax strings.
*
* @author Jason Davis - https://www.codedevelopr.com/
*
* Tutorial: https://www.codedevelopr.com/articles/php-spintax-class/
*
* Updated with suggested performance improvement by @PhiSYS.
@riedayme
riedayme / GoogleDriveImage.txt
Last active May 15, 2020 08:23
Google Drive Image Host
<?php
$remoteImage = "https://drive.google.com/uc?id=1DqLVbmwjnZ9wKU0rY7F0yEupBtnw2JFY";
$imginfo = getimagesize($remoteImage);
header("Content-type: {$imginfo['mime']}");
header("Cache-Control: max-age=2592000");
readfile($remoteImage);
?>
https://www.youtube.com/results?search_query=google+drive+as+cdn
@riedayme
riedayme / Count Simple.html
Created May 14, 2020 09:35
Count Simple Javascript
<div id="count"></div>
<script type="text/javascript">
var time = 5;
function CountDown(){
var eltime = document.getElementById('count');
eltime.innerHTML = time;
time = time - 1;
if (time < 0) {
alert('success');
@riedayme
riedayme / spintax.php
Created May 14, 2020 09:32
Create Spin Text PHP
<?php
$text = "Father fries a turkey in the cooking room accompanied by mother who makes drinks and father is really happy.";
$corr = [ 'father' => '{father|daddy}', 'fries' => '{fries|cooks}', 'cooking room' => '{cooking room|kitchen}' ];
$words = array_keys($corr);
rsort($words);
$pattern = '~\b(?:' . implode('|', $words) . ')\b~ui';
$result = preg_replace_callback($pattern, function ($m) use ($corr) {