Skip to content

Instantly share code, notes, and snippets.

View wontondon's full-sized avatar
:bowtie:

Donnie McNeal wontondon

:bowtie:
View GitHub Profile
@nick-cheatwood7
nick-cheatwood7 / middleware.ts
Last active October 3, 2023 15:47
Proof-of-concept using custom middleware with Next.js 13 route handlers.
// src/lib/middleware.ts
import { randomUUID as uuid } from "crypto";
import chalk from "chalk";
import { NextFetchEvent, NextRequest, NextResponse } from "next/server";
import { ZodError } from "zod";
export type MaybePromise<T> = T | Promise<T>;
export type FetchRequestHandler = (
req: Request | NextRequest,
@stevenringo
stevenringo / reinvent-2017-youtube.md
Created December 3, 2017 23:01
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description

@gabrielemariotti
gabrielemariotti / Toolbar.java
Created August 4, 2014 13:22
Android-L: A little example of the new Toolbar view.
Toolbar toolbar = (Toolbar)findViewById(R.id.toolbar);
//Title and subtitle
toolbar.setTitle("MY toolbar");
toolbar.setSubtitle("Subtitle");
//Menu
toolbar.inflateMenu(R.menu.toolbar_menu);
toolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {
@necaris
necaris / couchdb2cb.py
Last active December 2, 2017 09:55
Simple script to transfer data from CouchDB to Couchbase
#-*-coding: utf-8-*-
"""
Simple script to dump documents out of a CouchDB database and straight into
a Couchbase instance.
"""
import time
import sys
import argparse
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@P7h
P7h / IntelliJ_IDEA__Perf_Tuning.txt
Last active July 6, 2024 10:42
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1