Skip to content

Instantly share code, notes, and snippets.

@zonay
zonay / artifacts...SiksokToken_metadata.json
Created April 17, 2022 16:05
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
{
"compiler": {
"version": "0.8.4+commit.c7e474f2"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
@zonay
zonay / artifacts...SiksokToken.json
Created April 17, 2022 16:03
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
@zonay
zonay / single-product.php
Created March 24, 2020 16:11
Output a list of taxonomy terms, then highlight the terms the belong to the current post. #snippet #WordPress #woocommerce
<?php
$terms = get_the_terms( $post->ID, 'product_cat' );
if ( !empty( $terms ) ){
// get the first term
$term = array_shift( $terms );
$slugofpost = $term->slug;
}
?>
<style>
@zonay
zonay / readme.md
Created February 20, 2020 19:25
Wordpress JSON API Cheat Sheet
@zonay
zonay / object_constructor.js
Created February 19, 2020 21:02
My best constructor ever lol
let people = new Object();
// person constructor
function Person(city, bDate) {
this.city = city;
this.bDate = bDate;
}
// pushing person into people object
function createPerson(name, city, bDate) {
@zonay
zonay / settings.json
Last active February 9, 2020 10:35
format laravel blade template files with beautify plugin #vscode
"beautify.language": {
"html": [
"blade",
"html"
]
},
@zonay
zonay / functions.php
Created February 4, 2020 16:20
adding post filter dropdown for custom taxonomy in wordpress admin dashboard #CPT
// adding custom taxonomy filter to admin dashboard for city guide items
function pippin_add_taxonomy_filters() {
global $typenow;
// an array of all the taxonomyies you want to display. Use the taxonomy name or slug
$taxonomies = array('city_guide');
// must set this to the post type you want the filter(s) displayed on
if( $typenow == 'the_city' ){
@zonay
zonay / index.php
Created January 29, 2020 15:19
bootstrap 4 vertical align by table cell method
<div class="container">
<div class="row">
<div class="col-12 bg-warning p-3 d-table h-100 w-100">
<span class="display-4 h4 ml-2 text-uppercase text-dark font-weight-bolder d-table-cell align-middle"><?php single_cat_title( __( '', 'textdomain' ) ); ?></span>
<a href="{{ home_url('/kyiv_events') }}"
class="btn btn-outline-dark btn-sm d-table-cell align-middle"><i class="far fa-circle"></i> Browse All Events</a>
</div>
</div>
</div>
@zonay
zonay / settings_sample.json
Created January 29, 2020 14:09
enabling emmet in blade files vs code
"emmet.triggerExpansionOnTab": true,
"emmet.includeLanguages": {
"javascript": "javascript",
"vue-html": "html",
"php": "html",
"blade": "html",
}
@zonay
zonay / sidebar.php
Created January 29, 2020 12:57
list all categories from custom post type? #cpt #wordpress
<?php
$args = array(
'taxonomy' => 'event_category',
'orderby' => 'name',
'order' => 'ASC'
);
$cats = get_categories($args);
foreach($cats as $cat) {