Skip to content

Instantly share code, notes, and snippets.

View whoami15's full-sized avatar
🎯
Focusing

Daryl Ferrer Legion whoami15

🎯
Focusing
View GitHub Profile
@whoami15
whoami15 / Controller & Model
Created May 1, 2017 07:22
COntroller & model
<?php
//controller
public function getEvents()
{
$result=$this->Calendar_model->getEvents();
echo json_encode($result);
}
@whoami15
whoami15 / youtube-cover-art.php
Created April 6, 2019 15:39 — forked from petertwise/youtube-cover-art.php
Get the best version of youtube cover image without using the API
<?php
function url_exists( $url ) {
$headers = get_headers($url);
return stripos( $headers[0], "200 OK" ) ? true : false;
}
function get_youtube_id( $url ) {
$youtubeid = explode('v=', $url);
$youtubeid = explode('&', $youtubeid[1]);
@whoami15
whoami15 / functions.php
Created April 6, 2019 15:41 — forked from petertwise/functions.php
Examples of extending WordPress Walker_Nav_Menu for sibling and subpage menus
<?php
/**
* Custom Walker to extract current sister-sub-menu
*/
class Custom_Walker_Nav_Sister_Menu extends Walker_Nav_Menu {
var $found_parents = array();
function start_el(&$output, $item, $depth, $args) {
@whoami15
whoami15 / squarecandy-responsive-basics.js
Created April 6, 2019 15:41 — forked from petertwise/squarecandy-responsive-basics.js
Basic Load and Resize jQuery to start from
/***********
RESPONSIVE CALCULATIONS
**********/
// On the first time the page loads, or if the orientation changes
// (portrait to landscape, etc) call the recalculation script
$(window).on('load orientationchange', function(){
responsive_calc();
});
var mediaJSON = { "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\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@whoami15
whoami15 / meta-tags.md
Created May 19, 2019 13:37 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@whoami15
whoami15 / facebook_warning.html
Last active May 26, 2019 10:37 — forked from tosbourn/facebook_warning.html
How to recreate Facebook's console warning
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script type="text/javascript">
const warningTitleCSS = 'color:red; font-size:60px; font-weight: bold; -webkit-text-stroke: 1px black;';
const warningDescCSS = 'font-size: 18px;';
@whoami15
whoami15 / suggest_fb.html
Created May 27, 2019 03:48 — forked from bootandy/suggest_fb.html
AutoSuggest for facebook friends
<html>
<!-- Requires - jquery and jquery-ui -->
<link type="text/css" href="static/css/smoothness/jquery-ui-1.8.20.custom.css" rel="stylesheet" />
<script type="text/javascript" src="static/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="static/js/jquery-ui-1.8.20.custom.min.js"></script>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
@whoami15
whoami15 / media-query.css
Created May 30, 2019 02:16 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS