Skip to content

Instantly share code, notes, and snippets.

View tayfunerbilen's full-sized avatar
🙉
busy for earthly things

Tayfun Erbilen tayfunerbilen

🙉
busy for earthly things
View GitHub Profile
@tayfunerbilen
tayfunerbilen / 00-README-NEXT-SPA.md
Created March 24, 2023 13:28 — forked from gaearon/00-README-NEXT-SPA.md
Next.js SPA example with dynamic client-only routing and static hosting

Next.js client-only SPA example

Made this example to show how to use Next.js router for a 100% SPA (no JS server) app.

You use Next.js router like normally, but don't define getStaticProps and such. Instead you do client-only fetching with swr, react-query, or similar methods.

You can generate HTML fallback for the page if there's something meaningful to show before you "know" the params. (Remember, HTML is static, so it can't respond to dynamic query. But it can be different per route.)

Don't like Next? Here's how to do the same in Gatsby.

Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)
@tayfunerbilen
tayfunerbilen / gist:57b86eebe5e8663ec274f64812dd0647
Created October 10, 2018 15:03 — forked from burakerdem/gist:1007450
PHP: ucwords() for UTF-8 strings
<?php
if (!function_exists('mb_ucwords'))
{
function mb_ucwords($str)
{
return mb_convert_case($str, MB_CASE_TITLE, "UTF-8");
}
}
@tayfunerbilen
tayfunerbilen / custom-registration.php
Created August 27, 2017 13:05 — forked from trslater/custom-registration.php
Custom Registration Plugin
<?php
/*
Plugin Name: Custom Registration
Description: Updates user rating based on number of posts.
Version: 1.1
Author: Tristan Slater w/ Agbonghama Collins
Author URI: http://kanso.ca
*/
@tayfunerbilen
tayfunerbilen / html5-video-streamer.js
Created November 28, 2015 03:40 — forked from paolorossi/html5-video-streamer.js
Node.js HTML5 video streamer
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';