Skip to content

Instantly share code, notes, and snippets.


Gino onigetoc

View GitHub Profile
onigetoc / index.html
Created Nov 19, 2022
VimeJS CDN test
View index.html
style="--vm-player-theme: #e86c8b;"
onigetoc / getvideotype.js
Last active Nov 21, 2022
Javascript REGEX - Get video extension from video url and return video Type with IF
View getvideotype.js
/**************************** AUTOMATICALLY GET AND SET AUDIO & VIDEO TYPE ******************************/
const rtmp_suffix = /^rtmp:\/\//;
const hls_suffix = /\.m3u8/;
const mp4_suffix = /\.(mp4|m4p|m4v|mov)/i;
const hds_suffix = /\.f4m/;
const dash_suffix = /\.mpd/;
const flv_suffix = /\.flv/;
const webm_suffix = /\.webm/;
/* AUDIO */
//const mp3_suffix = /\.mp3/;
onigetoc / getvideotype.js
Last active Nov 22, 2022
javascript Switch Case REGEX - Get video extension from video url and return video Type with CASE
View getvideotype.js
function getType(url) {
switch (true) {
/* AUDIO */
case /\.(mp4|m4p|m4v|mov)/i.test(url):
return 'video/mp4';
/* VIDEO */
case /\.ogg/.test(url):
return 'video/ogg';
onigetoc / githack.js
Created Oct 13, 2022 — forked from martianyi/githack.js
bookmarklet to view file in
View githack.js
javascript:(function() {
"use strict";
[/^(https?):\/\/gitlab\.com\/([^\/]+\/[^\/]+)\/(?:raw|blob)\/(.+\..+?)(?:\?.*)?$/i, '$1://$2/raw/$3'],
[/^(https?):\/\/bitbucket\.org\/([^\/]+\/[^\/]+)\/(?:raw|src)\/(.+\..+?)(?:\?.*)?$/i, '$1://$2/raw/$3'],
[/^(https?):\/\/bitbucket\.org\/snippets\/([^\/]+\/[^\/]+)\/revisions\/([^\/\#\?]+)(?:\?[^#]*)?(?:\#file-(.+\..+?))$/i, '$1://!api/2.0/snippets/$2/$3/files/$4'],
[/^(https?):\/\/bitbucket\.org\/snippets\/([^\/]+\/[^\/\#\?]+)(?:\?[^#]*)?(?:\#file-(.+\..+?))$/i, '$1://!api/2.0/snippets/$2/HEAD/files/$3'],
[/^(https?):\/\/bitbucket\.org\/\!api\/2.0\/snippets\/([^\/]+\/[^\/]+\/[^\/]+)\/files\/(.+\..+?)(?:\?.*)?$/i, '$1://!api/2.0/snippets/$2/files/$3'],
[/^(https?):\/\/api\.bitbucket\.org\/2.0\/snippets\/([^\/]+\/[^\/]+\/[^\/]+)\/files\/(.+\..+?)(?:\?.*)?$/i, '$1://!api/2.0/snippets/$2/files/$3'],
View gist:91b95ef8158c0b88c55522f17c745bb5
{ "categories" :
[ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\n",
"sources" : [ "" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
{ "description" : "The first Blender Open Movie from 2006",
onigetoc / Materialize-Mobile.html
Last active Jul 14, 2022 — forked from TerrenceLP/landing-like-google.html
Materialize CSS Demo Template
View Materialize-Mobile.html
<!DOCTYPE html>
<!--Import Google Icon Font-->
<link href="" rel="stylesheet">
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="">
<!--Let browser know website is optimized for mobile-->
onigetoc / countries.json
Created Jul 12, 2022 — forked from tiagodealmeida/countries.json
List of countries with country code, name, currency code, population, capital and continent name in JSON format
View countries.json
"countries": {
"country": [
"countryCode": "AD",
"countryName": "Andorra",
"currencyCode": "EUR",
"population": "84000",
"capital": "Andorra la Vella",
"continentName": "Europe"
View hex-to-bgr.js
onigetoc /
Created Oct 5, 2020 — forked from aslamdoctor/
Wordpress - AJAX Load More Steps

Step 1. Load more button

global $wp_query; // you can remove this line if everything works for you
// don't display the button if there are not enough posts
if (  $wp_query->max_num_pages > 1 )
	echo '<div class="misha_loadmore">More posts</div>'; // you can use <a> as well