Skip to content

Instantly share code, notes, and snippets.

View mckrava's full-sized avatar

Max Kravchuk mckrava

  • Ukraine
View GitHub Profile

SocialRemark

SocialRemark protocol is designed to process cross-chain actions.

SocialRemark message format

  • Domain Registration prot_name::version::action::op_id::target::domain_name::token
  • Energy Generation prot_name::version::action::op_id::target::energy_amount::token
@mckrava
mckrava / nuxt.config.js
Created May 22, 2020 16:21
Add fontawesom to nuxt
modules: [
[
'nuxt-fontawesome',
{
imports: [
{
set: '@fortawesome/free-solid-svg-icons',
icons: ['fas'],
},
{
@mckrava
mckrava / main.html
Last active October 29, 2018 12:17
Get image file info and add restrictions
<div class="edit-user-avatar">
<div class="user-avatar" style="background-image: url('***.png')">
</div>
<label class="file-input-label-container" for="user_avatar">
<span>Choose image</span>
<div class="file-error-container"></div>
<input class="file-input" data-multiple-caption="{count} files selected" type="file" name="user[avatar]" id="user_avatar">
<input type="hidden" name="user[avatar_cache]" id="user_avatar_cache">
</label>
</div>
@mckrava
mckrava / main
Last active September 11, 2018 12:19
Set Google map API key for ACF
// Set Google API key
function my_acf_google_map_api( $api ){
$api['key'] = '__private_key__';
return $api;
}
add_filter('acf/fields/google_map/api', 'my_acf_google_map_api');
@mckrava
mckrava / Get user location by ip
Created August 7, 2017 09:41
Get user location by ip
$.get("https://ipinfo.io", function(response) {
console.log(response);
current_country = response.country;
}, "jsonp");
conf