Skip to content

Instantly share code, notes, and snippets.

View mikedotexe's full-sized avatar
🤙
hakuna matata

Mike Purvis mikedotexe

🤙
hakuna matata
View GitHub Profile
function l() {
try {
// this works in Firefox/Opera
console.log.apply( this, arguments );
} catch (e) {
// this is for Chrome/IE
var args = [], i = 0;
while( i++ < arguments.length )
args.push('arg' + i);
@mikedotexe
mikedotexe / wedgie-snippet
Created January 27, 2015 21:45
Refresh Poll 01
<script src='https://www.wedgies.com/js/widgets.js'></script><noscript><a href='https://www.wedgies.com/question/54c80665178afd090000053f'>What should be the next Refresh topic?</a></noscript><div class='wedgie-widget' data-wd-pending data-data-wd-type='embed' data-wd-version='v1' id='54c80665178afd090000053f' style='max-width: 640px; margin: 0px auto' ></div>
@mikedotexe
mikedotexe / postgres_backup.sh
Created April 21, 2017 18:43
Bash script to run postgres backup using AWS CLI
#!/bin/bash
PATH=/usr/bin:/bin:/home/ubuntu/.local/bin:$PATH
# create dump file
TIMESTAMP=$(date +%Y-%m-%d--%H_%M_%S)
FILENAME="ridelist_"$TIMESTAMP".dump"
pg_dump -U postgres -h localhost -p 6059 ridelist > $FILENAME
# compress
tar czvf $FILENAME".tar.gz" $FILENAME
@mikedotexe
mikedotexe / drupal-8-get-frontpage-alias.php
Created June 20, 2017 18:57
Get homepage path of Drupal 8 site from configuration
<?php
use Drupal\Core\Config\Config;
// ...
$config = \Drupal::config('system.site');
$front_uri = $config->get('page.front');
$alias = \Drupal::service('path.alias_manager')->getAliasByPath($front_uri);
@mikedotexe
mikedotexe / list-cert-expirations.sh
Created October 5, 2017 22:44
Script to list Laravel Forge SSL cert expirations by site
#!/bin/bash
printf "%-50s | %-25s\n" "SITE" "EXPIRES"
echo "-------------------------------------------------------------------"
for site in `grep -hR "ssl_certificate /etc/nginx/" /etc/nginx/sites-enabled/|awk '/ssl_certificate/ {print $2}'`; do
sitename="$(echo $site | awk -F/ '{print $5}')"
expire="$(sudo openssl x509 -enddate -noout -in ${site::-1}|awk -F= '/notAfter=/ {print $2}')"
printf "%-50s | %-25s\n" "$sitename" "$expire"
done
@mikedotexe
mikedotexe / pamplemousse.md
Last active January 26, 2019 18:33
Hella Croix book club suggestions
Suggester Title Author TL;DR Good Reads Link
Mike Still Life with Woodpecker Tom Robbins Sort of a love story that takes place inside a pack of Camel cigarettes. It reveals the purpose of the moon, explains the difference between criminals and outlaws, examines the conflict between social activism and romantic individualism, and paints a portrait of contemporary society that includes powerful Arabs, exiled royalty, and pregnant cheerleaders. It also deals with the problem of redheads 4.04 aloha
Nawal Devil in the White City Erik Larson Intertwines the true tale of the 1893 World's Fair and the cunning serial killer who used the fair to lure his victims to their death. Combining meticulous research with nail-biting storytelling, Erik Larson has crafted a narrative with all the wonder of newly discovered history and the thrills of the best fiction 3.99 [buggah](https://www.powells.com/book/devi
@mikedotexe
mikedotexe / chicktech-2019-basics.html
Last active November 9, 2019 16:41
Basic HTML CSS for first interactions
<html>
<head>
<title>Hello ChickTech 2019</title>
<style>
#top {
background-color: lightblue;
}
body p {
color: gray;
}
@mikedotexe
mikedotexe / meeting-notes.md
Last active July 20, 2021 23:49
Agenda for 7/15/21 sync about Rust SDK
@mikedotexe
mikedotexe / token-standards-handoff.md
Last active October 5, 2021 16:37
Token standards handoff

The main things we need from token standards are minting and burning of fungible and non-fungible tokens, as well as events. We need to now determine if we SHOULD have standard function names for minting and burning, and if so, if they should be in a single standard or two. (For minting, for burning.)

Illia is proposing we do not have function names and instead only events:

Image of comment suggesting we should not have function-based names for minting and burning

(link to comment)

Wondering how this will work with NFT contracts "out there" that are using nft_mint that indexer and Wallet have worked around in order to show them as collectibles.