Skip to content

Instantly share code, notes, and snippets.

View tan86's full-sized avatar
🎯
Focusing

J tan86

🎯
Focusing
View GitHub Profile
@tan86
tan86 / flow-field-sdl2.cc
Last active October 10, 2023 19:18
draft-001 💩
#include<SDL2/SDL.h>
#include<math.h>
#include<stdio.h>
#include<time.h>
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
struct Vec2 {
double x{};
@tan86
tan86 / main.dart
Created October 8, 2023 08:19
flow-fields
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'dart:math';
import 'dart:ui';
void main() => runApp(const App());
class App extends StatelessWidget {
const App({super.key});
@tan86
tan86 / init.lua
Last active July 19, 2022 16:27
nvim config
vim.cmd "packadd paq-nvim"
vim.g.mapleader = ','
local indent = 4
local lsp, cmp = require'lspconfig', require'cmp'
local set = vim.opt
local function map(mode, lhs, rhs, opts)
local options = {noremap = true, silent = true}
if opts then options = vim.tbl_extend('force', options, opts) end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
@tan86
tan86 / init.lua
Last active January 10, 2022 01:58
----[[ Helpers ]]----
vim.cmd 'packadd paq-nvim'
local lsp = require 'lspconfig'
local paq = require 'paq-nvim'.paq
local scopes = {o = vim.o, b = vim.bo, w = vim.wo}
local function map(mode, lhs, rhs, opts)
local options = {noremap = true, silent = true}
if opts then options = vim.tbl_extend('force', options, opts) end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)