First let's make sure HB is updated. Open up terminal for the following steps.
$ brew update
/** | |
* 1. Initialize new node project (npm init -y) | |
* 2. Run: npm install ethers | |
* 3. Add private key where PRIVATE_KEY | |
* 4. Optionally, update gas price (line 29) or chosen gas limit | |
* 5. Run: node mint-temporal-loot.js | |
* 6. NOTE: Don't forget to get an API key fgrom Alchemy and replace the variable in line 15 | |
*/ | |
// Imports | |
require("dotenv").config(); |
First let's make sure HB is updated. Open up terminal for the following steps.
$ brew update
function slugify(string) { | |
const a = 'àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìıİłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;' | |
const b = 'aaaaaaaaaacccddeeeeeeeegghiiiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------' | |
const p = new RegExp(a.split('').join('|'), 'g') | |
return string.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(p, c => b.charAt(a.indexOf(c))) // Replace special characters | |
.replace(/&/g, '-and-') // Replace & with 'and' | |
.replace(/[^\w\-]+/g, '') // Remove all non-word characters |
/** | |
* NB: updated version available here: https://github.com/helgatheviking/add-to-cart-form-shortcode | |
*/ | |
/** | |
* Add [add_to_cart_form] shortcode that display a single product add to cart form | |
* Supports id and sku attributes [add_to_cart_form id=99] or [add_to_cart_form sku=123ABC] | |
* Essentially a duplicate of the [product_page] | |
* but replacing wc_get_template_part( 'content', 'single-product' ); with woocommerce_template_single_add_to_cart() | |
* |
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/.git/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" /> | |
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/node_modules/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" /> | |
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/_build/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" /> | |
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/deps/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" /> |
#!/bin/bash | |
# Install Wordpress with Square Candy default using WP CLI | |
read -p 'Site URL (example.com): ' url | |
read -p 'Site Title: ' title | |
read -p 'WP Admin username: ' admin_user | |
read -sp 'WP Admin password: ' admin_password | |
read -p ' | |
WP Admin email: ' admin_email | |
read -p 'Database name: ' dbname | |
read -p 'Database user: ' dbuser |
// ---- | |
// Sass (v3.4.14) | |
// Compass (v1.0.3) | |
// ---- | |
@mixin staggered_transitions($nth:1,$items:2,$initial:0,$step:.1){ | |
@for $i from $nth through $items{ | |
&:nth-of-type(#{$i}){ | |
transition-delay:#{$initial}s; | |
} |
/* bling.js */ | |
window.$ = document.querySelector.bind(document); | |
window.$$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
NodeList.prototype.__proto__ = Array.prototype; | |
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
<?php | |
/* | |
Plugin Name: Get Remote Image to Custom Field | |
*/ | |
add_filter('really_simple_csv_importer_post_saved', function($post) | |
{ | |
if (is_object($post)) { | |
// Get the meta data of which key is "image" | |
$image = $post->image; |