Skip to content

Instantly share code, notes, and snippets.

View moflo's full-sized avatar
🎯
Focusing

moflo moflo

🎯
Focusing
View GitHub Profile
@moflo
moflo / TimeAgo.swift
Last active October 25, 2015 04:20 — forked from hansott/TimeAgo.swift
Time ago function swift ios cocoa
// MARK: - NSDate timeAgoSinceDate
// Updated for Swift2.0
func timeAgoSinceDate(date:NSDate, numericDates:Bool) -> String {
let calendar = NSCalendar.currentCalendar()
let now = NSDate()
let earliest = now.earlierDate(date)
let latest = (earliest == now) ? date : now
let components:NSDateComponents = calendar.components([.Hour, .Minute, .Day, .WeekOfYear, .Month, .Year, .Second], fromDate: earliest, toDate: latest, options: [])
@moflo
moflo / App.js
Created November 20, 2021 22:22 — forked from farzaa/App.js
import './styles/App.css';
import twitterLogo from './assets/twitter-logo.svg';
import { ethers } from "ethers";
import React, { useEffect, useState } from "react";
import myEpicNft from './utils/MyEpicNFT.json';
const TWITTER_HANDLE = '_buildspace';
const TWITTER_LINK = `https://twitter.com/${TWITTER_HANDLE}`;
const OPENSEA_LINK = '';
const TOTAL_MINT_COUNT = 50;