Skip to content

Instantly share code, notes, and snippets.

View shiftyp's full-sized avatar

Ryan Kahn shiftyp

View GitHub Profile
@findmory
findmory / supabase-functions-nextjs-config.md
Created May 31, 2025 22:38
Next.js 15 + Supabase Edge Functions Configuration Guide

Next.js + Supabase Edge Functions Configuration Guide

When using Supabase Edge Functions (Deno runtime) within a Next.js project, you need to configure three files to prevent build errors and linting issues. The main problem is that Next.js uses Node.js/TypeScript while Supabase functions use Deno, which have different global APIs.

Files to Update

1. tsconfig.json - Exclude Supabase Functions from TypeScript Compilation

Add the supabase/functions/** directory to the exclude array to prevent TypeScript from trying to compile Deno code during the Next.js build process.

@asgaut
asgaut / spectrum.py
Created October 2, 2016 21:09
Convert IQ samples in wav file to array of complex numbers and plot spectrum as function of time
# Plot spectrum of wav file saved by SDR# as function of time (3D plot)
# Bandwidth = 32 kHz when input sample rate = 2.048 MHz (decimated by 64)
# Asgaut Eng/2016-10-02
import numpy as np
import scipy.io.wavfile as wav
import scipy.signal as signal
from scipy.fftpack import fft, fftfreq, fftshift
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
@jpillora
jpillora / sshd.go
Last active June 3, 2026 17:36
Go SSH server complete example - Read more here https://blog.gopheracademy.com/go-and-ssh/
// A small SSH daemon providing bash sessions
//
// Server:
// cd my/new/dir/
// #generate server keypair
// ssh-keygen -t rsa
// go get -v .
// go run sshd.go
//
// Client:
@akolosov
akolosov / gist:cedaac86b333a4ced95f
Last active February 5, 2025 05:47
vim 7.4 with lua+GUI on Ubuntu 14.04
#!/bin/sh
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev mercurial libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
sudo mkdir /usr/include/lua5.1/include
sudo ln -s /usr/include/luajit-2.0 /usr/include/lua5.1/include
cd ~
hg clone https://code.google.com/p/vim/
@staltz
staltz / introrx.md
Last active October 28, 2026 13:21
The introduction to Reactive Programming you've been missing
@russelldavies
russelldavies / hterm_solarized.js
Last active May 7, 2021 18:31
Chrome/Chromium OS hterm and Secure Shell solarized color scheme.
// Run in the JavaScript console of the hterm browser window
// Clear all existing settings - you probably don't want to do this.
// Preferences are now stored in "chrome.storage.sync" instead of
// "window.localStorage" so if you clear your preferences the changes
// will be propagated to other devices.
//term_.prefs_.storage.clear();
var htermProfiles = [
@MrDrews
MrDrews / Default.sublime-theme
Created April 24, 2013 14:56
Solarized (dark) -- Complement the stock Solarized (dark) theme in sublime text 3 by placing this `Default.sublime-theme` inside the `Packages/User` folder. It will recolor the sidebar.
[
{
"class": "sidebar_container",
// $base01: #586e75
"layer0.tint": [88,110,117],
"layer0.opacity": 1.0,
"layer0.draw_center": false,
"layer0.inner_margin": [0, 0, 1, 0],
"content_margin": [0, 0, 1, 0]
@MrDrews
MrDrews / Default.sublime-theme
Created April 22, 2013 13:41
Solarized (light) -- Complement the stock Solarized (light) theme in sublime text 3 by placing this `Default.sublime-theme` inside the `Packages/User` folder. It will recolor the sidebar.
[
{
"class": "sidebar_container",
// $base02: #073642
"layer0.tint": [7,54,66],
"layer0.opacity": 1.0,
"layer0.draw_center": false,
"layer0.inner_margin": [0, 0, 1, 0],
"content_margin": [0, 0, 1, 0]
@tbranyen
tbranyen / backbone.collectioncache.js
Created June 4, 2012 06:37
Backbone.Collection caching by URL
/*!
* backbone.collectioncache.js v0.0.2
* Copyright 2012, Tim Branyen (@tbranyen)
* backbone.collectioncache.js may be freely distributed under the MIT license.
*/
(function(window) {
"use strict";
// Dependencies
@millermedeiros
millermedeiros / build.js
Created May 9, 2012 01:15
sample node.js build script including RequireJS optimizer (r.js) and copy/delete/filter files
// Combine JS and CSS files
// ---
//
// Make sure you install the npm dependencies
// > cd YOUR_PROJECT_FOLDER
// > npm install
//
// Than run:
// > node build