Skip to content

Instantly share code, notes, and snippets.

<h1><a href="https://yournextdomain.com">YourNextDomain.com</a></h1>
<table border="1" class="dataframe">
<thead>
<tr style="text-align: right;">
<th>Domain</th>
<th>Price</th>
<th>Estimate</th>
<th>Bids</th>
<th>Age</th>
<th>Expires In</th>
@DavidNix
DavidNix / cosmos_go_version.sh
Created July 8, 2022 16:37
Find Cosmos Go Versions
#!/usr/bin/env bash
# Quick and dirty script to get sense of Go versions for Cosmos chains.
# Must be run at root of chain registry: git clone https://github.com/cosmos/chain-registry.git
REPOS=$(cat $(find . -name "chain.json") | jq '.codebase.git_repo')
results=""
for repo in $REPOS
@DavidNix
DavidNix / SlideRevealTransitioner.swift
Last active October 19, 2023 11:04
iOS example of using UIViewControllerTransitioningDelegate to create a slide to reveal effect.
// A common effect when you press a hamburger button.
public class SlideRevealTransitioner: NSObject {
private let percentage: CGFloat
public init(percentage: CGFloat) {
self.percentage = percentage
}
typedef id (^FnMapHandler)(id element, NSInteger index);
@interface NSArray (Functional)
- (NSArray *)fn_mapAndCompact:(FnMapHandler)mapHandler;
@end
@implementation NSArray (Functional)
@DavidNix
DavidNix / logNSNotifications.m
Last active December 30, 2022 10:58
Log all NSNotifications as they are fired
static void LogNSNotifications(CFNotificationCenterRef center,
void *observer,
CFStringRef name,
const void *object,
CFDictionaryRef userInfo);
void LogNSNotifications(CFNotificationCenterRef center,
void *observer,
CFStringRef name,
const void *object,
My name is {{.Name}} and I'm {{.Age}} years old!!
Obfuscator = function (selector) {
var $el = $(selector);
var prefix = "mailto:";
var name = "test";
var domain = "@example.com";
var href = prefix + name + domain + href;
$el.on("click", function () {
$el.attr("href", href);
setTimeout(function () {