Skip to content

Instantly share code, notes, and snippets.

View klaylton's full-sized avatar
💭
Resolvendo problemas desde 1988.

Klaylton Fernando klaylton

💭
Resolvendo problemas desde 1988.
  • Montagem de Fotos
  • Codo - Maranhão
  • X @bboyguil
View GitHub Profile
@GlauberF
GlauberF / Configuracao LAMP com PHP 7.1 no Deepin
Last active August 29, 2024 18:42
Comandos para instalacao do LAMP no Deepin, com PHP 7.1
## ATUALIZAR OS
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade
## INSTALAR O MYSQL-SERVER
sudo apt-get install mysql-server
## INSTALAR O APACHE2
sudo apt-get install apache2
## CHECAR VERSAO DO PHP NO REPOSITORIO
@miya0001
miya0001 / cors-for-the-wordpress-rest-api.php
Last active January 31, 2023 07:42
CORS for the WordPress REST API
<?php
function my_customize_rest_cors() {
remove_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' );
add_filter( 'rest_pre_serve_request', function( $value ) {
header( 'Access-Control-Allow-Origin: *' );
header( 'Access-Control-Allow-Methods: GET' );
header( 'Access-Control-Allow-Credentials: true' );
header( 'Access-Control-Expose-Headers: Link', false );
@leocaseiro
leocaseiro / class-wp-cpt-plugin-base-singleton.php
Created August 20, 2014 01:23
WordPress Plugin with Custom Post and Metabox using Singleton
<?php
if ( !class_exists('Primped_Base_Singleton') ):
abstract class Primped_Base_Singleton {
/**
* Parsed options for module
*
* @var array