Skip to content

Instantly share code, notes, and snippets.

@gaearon
gaearon / 00-README-NEXT-SPA.md
Last active May 5, 2024 15:12
Next.js SPA example with dynamic client-only routing and static hosting

Next.js client-only SPA example

Made this example to show how to use Next.js router for a 100% SPA (no JS server) app.

You use Next.js router like normally, but don't define getStaticProps and such. Instead you do client-only fetching with swr, react-query, or similar methods.

You can generate HTML fallback for the page if there's something meaningful to show before you "know" the params. (Remember, HTML is static, so it can't respond to dynamic query. But it can be different per route.)

Don't like Next? Here's how to do the same in Gatsby.

@jifunks
jifunks / pwnmedium.user.js
Last active July 13, 2020 18:24
Medium.com uses design and typography to legitimize ideas that might not deserve legitimacy. This script kills Medium's design so that critical thinking takes precedence over eye candy.
// ==UserScript==
// @name Remove Legitimacy From Medium
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Medium.com frames everyone's opinions in a way that gives them legitimacy in the subconscious. In reality, they are no more than blog posts. This script serves to strip any form of nice styling or legitimacy from Medium posts, and encourage critical thinking.
// @author Jake Funke
// @match medium.com/*
// @include https://*.medium.com/*
// @grant GM_addStyle
// @run-at document-idle
@devonzuegel
devonzuegel / clean-google-docs.css
Last active February 16, 2021 22:58
Custom styles for Stylus Chrome extension
/* This has moved to:
* https://github.com/devonzuegel/digital-nesting/blob/master/google-docs.css
*/
@avyfain
avyfain / ff.py
Last active January 2, 2023 02:45 — forked from elaineo/ff.py
Follow Friday
import json
import os
from collections import Counter
# pip install TwitterAPI
from TwitterAPI import TwitterAPI
# Edit ff.py for your account. Go to https://apps.twitter.com/ to get API keys
# Don't forget to fill in your screen name (or someone else's).

This recipe describes the classes, controllers, and jobs used by Standard Notes to build our own custom-fit Mailchimp replacement.

With the parts here, you should be able to put together your own email campaign system directly in your Rails app, removing the need to use an expensive online newsletter service.

@aparrish
aparrish / understanding-word-vectors.ipynb
Last active April 29, 2024 17:57
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fredbenenson
fredbenenson / kickstarter_sql_style_guide.md
Last active April 2, 2024 15:19
Kickstarter SQL Style Guide
layout title description tags
default
SQL Style Guide
A guide to writing clean, clear, and consistent SQL.
data
process

Purpose

@caseyg
caseyg / getting-started.md
Last active January 14, 2016 05:20
Getting Started with Jekyll and Github Pages

Here're a bunch of links to solid resources on how to make your first Github Pages/Jekyll project:

Tools:

@aparrish
aparrish / exercise_b.py
Created February 10, 2015 15:53
RWET Programming Exercise B
#
# RWET Programming Exercise B
#
# This worksheet is also a Python program. Your task is to read the
# task descriptions below and then write one or more Python statements to
# carry out the tasks. There's a Python "print" statement before each
# task that will display the expected output for that task; you can use
# this to ensure that your statements are correct.
#
@natelandau
natelandau / .bash_profile
Last active April 30, 2024 18:07
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management