Skip to content

Instantly share code, notes, and snippets.

View andrekeher's full-sized avatar
🏠
Working from home

André Keher andrekeher

🏠
Working from home
  • São Paulo, SP, Brazil
View GitHub Profile
<IfModule mod_expires.c>
ExpiresActive On
# Images
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType image/svg+xml "access 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/webp "access plus 1 month"
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
smtpuser = [USER]
smtpserverport = 587
smtppass = [PASS]
smtpsslcertpath =
assume8bitEncoding = UTF-8
confirm = never
INSERT INTO wp_users (user_login, user_pass, user_nicename, user_email, user_registered, display_name)
VALUES ('USER', MD5('PASS'), 'USER', '[email protected]', NOW(), 'USER');
INSERT INTO wp_usermeta (user_id, meta_key, meta_value)
VALUES ((SELECT MAX(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}');
INSERT INTO wp_usermeta (user_id, meta_key, meta_value)
VALUES ((SELECT MAX(id) FROM wp_users), 'wp_user_level', '10');
jQuery(document).ready(function($) {
$('#carregar').on('click', function(e) {
e.preventDefault();
var file_frame = wp.media({
title: 'Materiais',
button: {
text: 'Configurar',
},
multiple: false
});
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
<?php
/**
* Based on Moodle 3.x Developer's Guide book example
*/
class Haversine
{
public $radius = 6378100; // Meters
public function get_distance($x1, $y1, $x2, $y2)
{
DELETE
FROM wp_posts
WHERE post_type = 'revision'
AND post_date < NOW() - INTERVAL 90 DAY;
DELETE
FROM wp_postmeta
WHERE post_ID NOT IN (SELECT
ID
FROM wp_posts);