Skip to content

Instantly share code, notes, and snippets.

View prosnave's full-sized avatar

Marindany Evans prosnave

View GitHub Profile
@prosnave
prosnave / core-set.sql
Created January 27, 2023 13:45 — forked from backpackerhh/core-set.sql
SQL - Movie-Rating Query Exercises
-- 1. Find the titles of all movies directed by Steven Spielberg.
SELECT title
FROM Movie
WHERE director = 'Steven Spielberg';
-- 2. Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order.
SELECT DISTINCT year
@prosnave
prosnave / wordpress error logging
Created January 15, 2018 07:13
error_log wordpress
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
//you can write to the log file using the error_log() function, this is a very useful function wrapper for it, make it available in your plugin:
if (!function_exists('write_log')) {
@prosnave
prosnave / gist:a90e4465ac1d459566c37f78a100bffe
Created January 12, 2018 18:19
wordpress excerpt customize
/**
* Clean up the_excerpt()
*/
function excerpt_more() {
return ' &hellip; <a href="' . get_permalink() . '">' . __('Continued', 'sage') . '</a>';
}
add_filter('excerpt_more', __NAMESPACE__ . '\\excerpt_more');
@prosnave
prosnave / wp_config.php
Created January 12, 2018 06:57 — forked from butlerblog/wp_config.php
Configure WordPress wp_mail function to send through SMTP server http://b.utler.co/Y3
<?php
/*
* Set the following constants in wp-config.php
* These should be added somewhere BEFORE the
* constant ABSPATH is defined.
*/
define( 'SMTP_USER', 'user@example.com' ); // Username to use for SMTP authentication
define( 'SMTP_PASS', 'smtp password' ); // Password to use for SMTP authentication
@prosnave
prosnave / dabblet.css
Created December 22, 2017 03:41 — forked from chriscoyier/dabblet.css
Ratings Stars
/*
Ratings Stars
(with as little code as possible)
*/
.rating {
unicode-bidi: bidi-override;
direction: rtl;
text-align: center;
}
.rating > span {