Skip to content

Instantly share code, notes, and snippets.

# Instagram
0.0.0.0 a.ns.cdninstagram.com
0.0.0.0 api.instagram.com
0.0.0.0 b.ns.cdninstagram.com
0.0.0.0 badges.instagram.com
0.0.0.0 black.ish.instagram.com
0.0.0.0 business.instagram.com
0.0.0.0 c.ns.cdninstagram.com
0.0.0.0 cdninstagram.com
0.0.0.0 creative.cdninstagram.com
# Google SafeSearch
216.239.38.120 google.com
216.239.38.120 www.google.com
216.239.38.120 google.co.uk
216.239.38.120 www.google.co.uk
# Bing SafeSearch
204.79.197.220 www.bing.com
204.79.197.220 bing.com
@JeremyTheModernist
JeremyTheModernist / website-scraper.py
Created November 12, 2024 20:25
Beautiful Soup Website Scraper
# A class to represent a Webpage
class Website:
"""
A utility class to represent a Website that we have scraped, now with links
"""
# Type hints for class attributes
url: str # Store the website's URL
title: str # Store the webpage title
body: str # Store the raw HTML content
@JeremyTheModernist
JeremyTheModernist / Requirements.txt
Created November 12, 2024 18:40
A pipenv requirements file for Jupyter + AI applications
python-dotenv
jupyterlab
ipywidgets
requests
numpy
pandas
scipy
scikit-learn
matplotlib
gensim
@JeremyTheModernist
JeremyTheModernist / app.js
Created September 14, 2020 18:02
A gist for very basic server side authorization
const express = require('express');
const bodyParser = require('body-parser');
const jwt = require('jsonwebtoken');
const app = express();
app.use(bodyParser.json());
const users = [];
@JeremyTheModernist
JeremyTheModernist / graphql-express.js
Last active August 21, 2020 19:23
Quickly scaffold and express server with graphql
const express = require('express');
const bodyParser = require('body-parser');
const { graphqlHTTP } = require('express-graphql');
// build schema allows you to build your schema as a string literal, processed through
// then build schema converts it into a js object
// then use it in the "schema" property in the express graphql middleware
// alternatively you can create these schemas in object form using graphql's GraphQLObjectType, and types like GraphQLString,
// GraphQL object types act more like components with resolvers included
// helpful article:
// https://dev.to/elisealcala/react-context-with-usereducer-and-typescript-4obm
import React, { createContext, useContext, useReducer } from "react";
type IState = {
count: number;
message?: string;
};
import React, { useState, createContext, useContext } from "react";
import { uuid } from "uuidv4";
var initialState = [
{
id: uuid(),
title: "Intro to HTML",
description: "Learn everything you need to know about html!",
duration: "1hr 5min",
},
@JeremyTheModernist
JeremyTheModernist / store.js
Created June 29, 2020 21:43
Global React state with Reducer
import React, { createContext, useContext, useReducer } from "react";
var StoreContext = createContext();
var initialState = {
count: 0,
};
var reducer = (state, action) => {
switch (action.type) {

Setup Gatsby Layout Component

Gatsby Layout Component is a great way to wrap your site with a consistent header and footer


Install necessary NPM packages