Skip to content

Instantly share code, notes, and snippets.

@TomOndiba
TomOndiba / hosts
Created April 15, 2023 22:25 — forked from consti/hosts
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost
@TomOndiba
TomOndiba / duration.php
Created January 6, 2018 01:19 — forked from joshwnj/duration.php
Creating ISO 8601 durations
<?php
$parts = secondsToDuration(61);
assert($parts['hours'] === 0);
assert($parts['minutes'] === 1);
assert($parts['seconds'] === 1);
assert('PT0H1M1S' === formatDuration($parts));
$parts = secondsToDuration(7202);
assert($parts['hours'] === 2);
@TomOndiba
TomOndiba / youtube api video category id list
Created January 5, 2018 18:03 — forked from dgp/youtube api video category id list
youtube api video category id list
2 - Autos & Vehicles
1 - Film & Animation
10 - Music
15 - Pets & Animals
17 - Sports
18 - Short Movies
19 - Travel & Events
20 - Gaming
21 - Videoblogging
22 - People & Blogs
@TomOndiba
TomOndiba / video_convert_recursive.php
Created December 30, 2017 13:43 — forked from ibnux/video_convert_recursive.php
This script for converting all videos on your NAS, i use this script for converting video on my Synology NAS, This will recursively convert all your video
<?php
/*
Created by @ibnux January 2015
Use with your own risk
This script for converting all videos on your NAS
i use this script for converting video on my Synology NAS
This will recursively convert all your video
put this in your home folder
<?php
/**
*
* This is a quick way to turn a simple text file
* with a very long list of urls in a text file (sitemap-urls.txt)
* Where "very long" is an expected url number greater than 10,000
* If loaded without a valid query parameter "page" it will load a
* Site Index site map, otherwise load the individual XML site map
* 10,000 urls into a valid XML Sitemap:
* http://en.wikipedia.org/wiki/Sitemaps
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noodp, noydir" />
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
<link rel="canonical" href="http://mysite.com/" />
<link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" />
@TomOndiba
TomOndiba / RESPONSIVE.md
Created December 7, 2017 19:57 — forked from dirkdunn/RESPONSIVE.md
Responsive Design

Responsive Web Design & Bootstrap Framework

Lesson Objectives

Part 1
  • Describe the benefits of using responsive design
  • Describe what it means to go mobile first
  • Explain the difference between a responsive website and a mobile-specific website
  • Describe how to test responsive layouts while developing
  • Use media queries to target viewport sizes
@TomOndiba
TomOndiba / index.php
Created April 24, 2017 11:41 — forked from jakerullman/index.php
Leaked Facebook files from 2007
<? php
include_once $_SERVER['PHP_ROOT'].'/html/init.php';
include_once $_SERVER['PHP_ROOT'].'/lib/home.php';
include_once $_SERVER['PHP_ROOT'].'/lib/requests.php';
include_once $_SERVER['PHP_ROOT'].'/lib/feed/newsfeed.php';
include_once $_SERVER['PHP_ROOT'].'/lib/poke.php';
include_once $_SERVER['PHP_ROOT'].'/lib/share.php';
include_once $_SERVER['PHP_ROOT'].'/lib/orientation.php';
include_once $_SERVER['PHP_ROOT'].'/lib/feed/newsfeed.php';
#!/usr/bin/perl
use Mysql;
use strict;
use vars qw($school_name);
use vars qw($pass);
require "./cgi-lib.pl";
@TomOndiba
TomOndiba / README.md
Last active August 29, 2015 14:18 — forked from nikcub/README.md