Skip to content

Instantly share code, notes, and snippets.

# sudoku solver using backtracking / recursion
import os
import sys
import glob
import json
import re
import math
import copy
@Gosev
Gosev / jokes.tsx
Created February 14, 2021 06:15
pages/jokes.tsx in NextJS : useEffect + useState + Axios
import * as React from 'react';
import { useEffect, useState } from 'react';
import axios from 'axios';
const API = 'https://icanhazdadjoke.com/';
const headers = {accept: 'application/json'};
interface Joke {
id: string;
@Gosev
Gosev / gist:e04abeb6079273b3be54ee6496a0b309
Last active January 24, 2021 09:16
NextJS copy index.html files to their folder name
export S3_BUCKET='<enter s3 bucket>'
export PROFILE='<set your aws profile, or default>'
next build && next export
cd ./out
aws s3 cp . s3://${S3_BUCKET}/ --recursive --profile=${PROFILE} --exclude="*.html" --exclude=".git/*" --acl=public-read --cache-control max-age=7776000,public
aws s3 cp . s3://${S3_BUCKET}/ --recursive --profile=${PROFILE} --exclude "*" --include="*.html" --acl=public-read --cache-control max-age=600,public
Verifying that +davidhockley is my blockchain ID. https://onename.com/davidhockley