Skip to content

Instantly share code, notes, and snippets.

@autodidacticon
autodidacticon / cmc-swagger.yml
Last active May 10, 2024 13:47
cmc-swagger
openapi: '3.0.3'
info:
title: CoinMarketCap Cryptocurrency API Documentation
version: 1.26.0
description: "# Introduction\nThe CoinMarketCap API is a suite of high-performance RESTful JSON endpoints that are specifically designed to meet the mission-critical demands of application developers, data scientists, and enterprise business platforms.\n\nThis API reference includes all technical documentation developers need to integrate third-party applications and platforms. Additional answers to common questions can be found in the [CoinMarketCap API FAQ](https://coinmarketcap.com/api/faq).\n\n# Quick Start Guide\n\nFor developers eager to hit the ground running with the CoinMarketCap API here are a few quick steps to make your first call with the API.\n\n1. **Sign up for a free Developer Portal account.** You can sign up at [pro.coinmarketcap.com](https://pro.coinmarketcap.com) - This is our live production environment with the latest market data. Select the free `Basic` plan if it meets your needs or upgra
@n-s-k
n-s-k / OOP_F2003_Part_2.md
Last active May 10, 2024 13:46
Object-Oriented Programming in Fortran 2003 Part 2: Data Polymorphism

Object-Oriented Programming in Fortran 2003 Part 2: Data Polymorphism

Original article by Mark Leair, PGI Compiler Engineer

Note: This article was revised in March 2015 and again in January 2016 to bring it up-to-date with the production software release and to correct errors in the examples.

This is Part 2 of a series of articles:

@n-s-k
n-s-k / OOP_F2003_Part_1.md
Last active May 10, 2024 13:46
Object-Oriented Programming in Fortran 2003 Part 1: Code Reusability
@christophewang
christophewang / QuickSort.cpp
Last active May 10, 2024 13:46
Quick Sort in C++
#include <iostream>
void printArray(int *array, int n)
{
for (int i = 0; i < n; ++i)
std::cout << array[i] << std::endl;
}
void quickSort(int *array, int low, int high)
{
@kennypete
kennypete / navigating_the_modes_of_Vim.md
Created April 18, 2024 20:46
Navigating the modes of Vim

Navigating the modes of Vim

This diagram illustrates navigating through Vim’s modes. It was built factoring Vim 9 (i.e., all its modes, including up to two new modes, cr and cvr, in November 2023). Information about the state() and 'showmode' is provided too.

SVG version

Some features are only available in the SVG version. It is not provided directly from within this gist’s files because SVGs do not always play nicely in GitHub (particularly, refusing to display embedded fonts).

The SVG version includes hover text help, which shows pertinent information about the underlying key, command, mode, etc.

@felixhaeberle
felixhaeberle / timeAgo.ts
Last active May 10, 2024 13:43
TypeScript: Get time distance as human readable string
// takes either a unix time number, string or a Date object and returns time string
export const timeAgo = (time: number | string | Date) => {
switch (typeof time) {
case "number":
break;
case "string":
time = +new Date(time);
break;
case "object":
@srelbo
srelbo / get_clerk_users.py
Last active May 10, 2024 13:43
Query clerk to get all users into a CSV file for https://loops.so import
import os
import requests
import csv
import time
def fetch_all_users(api_key):
url = "https://api.clerk.dev/v1/users"
headers = {
"Authorization": f"Bearer {api_key}",
@aluissp
aluissp / tailwind.config.js
Created February 12, 2023 20:45
Fade in animation in Tailwind CSS
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {
animation: {
fade: 'fadeIn .5s ease-in-out',
},
@judaew
judaew / keychron_k2.adoc
Last active May 10, 2024 13:39
Keychron K2 Manual

Keychron K2 Manual

Connect Bluetooth

On the side of the keyboard, switch the toggle to Bluetooth. Press fn+1 3 seconds and pair with device named Keychron K2.

  • fn+1 connect to 1st device

  • fn+2 connect to 2nd device

  • fn+3 connect to 3rd device

@debasishg
debasishg / gist:8172796
Last active May 10, 2024 13:37
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&amp;rep=rep1&amp;t