This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_youtube_video_url( $youtube_id ) | |
{ | |
$data = trim(urldecode(file_get_contents('https://youtube.com/get_video_info?video_id=' . $youtube_id))); | |
$d = parse_str($data, $info); | |
$stream_map = trim($info['url_encoded_fmt_stream_map']); | |
if( !$stream_map ) return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function convert_sbv_to_srt( $lines ) | |
{ | |
if( !$lines ) return ""; | |
// BREAK LINES ON RETURN | |
$lines = explode("\n", $lines); | |
// ADD A BLANK SPACE AT THE BEGINNING, | |
// I USE BLANK SPACES TO DETERMINE BETWEEN THE DIFFERENT TEXT BLOCKS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// USAGES: | |
// SQUARE WITH A TOP PADDING OF 20 | |
icon.stick(top: view.topAnchor, padTop: 20, width: 80, height: 80) | |
// PADDING TOP AND RIGHT | |
label.stick(top: view.topAnchor, trailing: view.trailingAnchor, padding: [20,20,0,0] ) | |
// PADDING TOP AND BOTTOM = 20, RIGHT AND LEFT = 0 | |
label.stick(top: view.topAnchor, trailing: view.trailingAnchor, padding: [20,0] ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Parameters: | |
1. Latitude | |
2. Longitude | |
3. Format: all, currently, minutely, hourly, daily | |
4. Dark Sky Secret Key | |
5. Cache time in seconds (default: 15 minutes) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function awesome_weather_spanish_days_of_week() | |
{ | |
return array('Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa'); | |
} | |
add_filter('awesome_weather_days_of_week', 'awesome_weather_spanish_days_of_week'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ServiceProvider.swift | |
// BT Top Shelf | |
// | |
// Created by HalBook on 9/28/15. | |
// Copyright © 2015 HalGatewood.com. All rights reserved. | |
// | |
import Foundation | |
import TVServices |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function hg_plugins_loaded() | |
{ | |
if( isset($_GET['weather_widget']) ) | |
{ | |
echo awesome_weather_logic( array('location' => 'Boston', 'owm_city_id' => 4930956, 'use_user_location' => true, 'background_by_weather' => true )); | |
die; | |
} | |
} | |
add_filter('plugins_loaded', 'hg_plugins_loaded', 100); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_vine_thumbnail( $id ) | |
{ | |
$vine = file_get_contents("http://vine.co/v/{$id}"); | |
preg_match('/property="og:image" content="(.*?)"/', $vine, $matches); | |
return ($matches[1]) ? $matches[1] : false; | |
} | |
echo get_vine_thumbnail('bv5ZeQjY352'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media screen and (max-width: 640px) | |
{ | |
.testimonial_rotator.template-threepigs .slide .testimonial_rotator_slide_inner:nth-child(2) { display: none; } | |
.testimonial_rotator.template-threepigs .slide .testimonial_rotator_slide_inner:nth-child(3) { display: none; } | |
} |
NewerOlder