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
/*----------Testimonial Slider Plugin------------ */ | |
.testimonial_rotator .has-image .img img, .testimonial_rotator_single.has-image .img img { | |
width: 100%; | |
max-width: 150px; | |
height: auto; | |
border-radius: 100px; | |
} | |
.testimonial_rotator .has-image .img { |
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 if( isset($weather->data['current'])) { ?> | |
<div class="awe-weather"> | |
<?php if($weather->show_icons) { ?><i class="<?php echo $weather->data['current']['icon']; ?>"></i><?php } ?> | |
<?php echo $weather->data['current']['temp']; ?>°F / <?php echo awe_f_to_c($weather->data['current']['temp']); ?>°C | |
<?php echo $weather->data['current']['description']; ?> | |
</div> | |
<?php } ?> |
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
/* | |
DATABASE STRUCTURE | |
CREATE TABLE `alexa_events` ( | |
`id` bigint(33) NOT NULL, | |
`user_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL, | |
`item_id` int(33) NOT NULL, | |
`offsetInMilliseconds` int(33) NOT NULL, | |
`status` varchar(25) COLLATE utf8_unicode_ci NOT NULL | |
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
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
exports.handler = function (event, context) | |
{ | |
try | |
{ | |
if (event.session.application.applicationId !== "YOUR APP ID") | |
{ | |
context.fail("Invalid Application ID"); | |
} |
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 hg_awesome_weather_wind_speed_text( ) | |
{ | |
return "mph"; | |
} | |
add_filter('awesome_weather_wind_speed_text', 'hg_awesome_weather_wind_speed_text'); |
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
Weather: | |
<?php echo $weather->data['current']['temp']; ?><sup>°</sup> | |
<?php if($weather->show_icons) { ?><i class="<?php echo $weather->data['current']['icon']; ?>"></i><?php } ?> |
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 hg_awesome_weather_wind_speed( $wind_speed_ms ) | |
{ | |
return number_format($wind_speed_ms / 0.44704, 0); | |
} | |
add_filter('awesome_weather_wind_speed', 'hg_awesome_weather_wind_speed'); | |
function hg_awesome_weather_wind_speed_text( ) | |
{ | |
return "mph"; |
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
#!/bin/bash | |
LOGFILE="/var/crons.log" | |
UP=$(pgrep mysql | wc -l); | |
if [ "$UP" -ne 1 ]; | |
then | |
echo "restarting mysql at $(date)" >> $LOGFILE | |
sudo service mysql restart | |
fi |
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 hg_plugin_locale() | |
{ | |
return 'es_ES'; | |
} | |
apply_filters('plugin_locale','hg_plugin_locale'); |