I hereby claim:
- I am nandomoreirame on github.
- I am oseunando (https://keybase.io/oseunando) on keybase.
- I have a public key ASC-nysW75DuYqBhwC5M0v6HovGYuZeTjr-yq6BgQJskXgo
To claim this, I am signing this object:
<?php | |
add_action('rest_api_init', function () { | |
register_rest_route( 'wp/v2', 'options', [ | |
'methods' => 'GET', | |
'callback' => 'api_theme_options' | |
]); | |
}); | |
function api_theme_options($request) { |
<?php | |
add_action('rest_api_init', function () { | |
register_rest_route( 'contact/v1', 'send', [ | |
'methods' => 'POST', | |
'callback' => 'api_send_contact_form' | |
]); | |
}); | |
function api_send_contact_form( $request ) { |
<?php | |
function theme_metabox_per_page() { | |
global $pagenow; | |
if ( $pagenow == 'post.php' ) { | |
$page_id = ( $_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['post_ID'] ) ? $_POST['post_ID'] : $_GET['post']; | |
if ( $page_id ) { | |
$page_slug = get_post_field( 'post_name', $page_id ); |
<?php | |
function get_custom_post_meta_cb($object, $field_name, $request) { | |
return get_post_meta( $object['id'], $field_name, true ); | |
} | |
function get_custom_post_meta_cb_the_content($object, $field_name, $request) { | |
return apply_filters( 'the_content', get_post_meta( $object['id'], $field_name, true ) ); | |
} |
import axios from 'axios' | |
const isProduction = process.env.NODE_ENV === 'production' | |
const http = axios.create({ | |
baseURL: `${isProduction ? 'https://api' : 'http://api-dev'}.dominio.com.br`, | |
headers: {} | |
}) | |
export default http |
#!/bin/bash | |
SEARCH="passenger_ruby \/home\/ubuntu\/.rvm\/gems\/ruby-2.4.1\/wrappers\/ruby;" | |
REPLACE="include snippets\/passenger_ruby.conf;" | |
# Note the double quotes | |
for file in ./sites-enabled/*; | |
do | |
sed -i -- "s/${SEARCH}/${REPLACE}/g" $file; | |
echo $file; |
sudo rm -rf /Library/Developer/CommandLineTools | |
xcode-select --install |
const faIcons = [ | |
'fa-500px', | |
'fa-address-book', | |
'fa-address-book-o', | |
'fa-address-card', | |
'fa-address-card-o', | |
'fa-adjust', | |
'fa-adn', | |
'fa-align-center', | |
'fa-align-justify', |
/** | |
* Returns a random number | |
* | |
* @param {Number} length | |
* @return {Number} | |
*/ | |
const randomNumber = length => | |
Math.floor(Math.random() * length) |
I hereby claim:
To claim this, I am signing this object: