Skip to content

Instantly share code, notes, and snippets.

@ishan9299
ishan9299 / main.c
Created November 28, 2023 06:06
main.c program to render and move 2d shapes.
#include <windows.h>
#include <stdbool.h>
#include <stdio.h>
#include <xinput.h>
#define SWAP(T, x, y) do {T t = x; x = y; y = t;} while(0)
#define MIN(x, y) ((x) < (y) ? x : y);
bool window_running = true;
@ishan9299
ishan9299 / init.lua
Last active February 20, 2022 01:07
neovim config
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
packer_bootstrap = fn.system({
'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim',
install_path
})
end
local options = {
@ishan9299
ishan9299 / init.el
Created February 10, 2022 17:07
minimal emacs config
;;; for performance
(setq gc-cons-threshold 100000000)
(setq read-process-output-max (* 1024 1024))
(add-hook 'after-init-hook #'(lambda ()
(setq gc-cons-threshold 800000)))
(require 'package)
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
@ishan9299
ishan9299 / build.bat
Created October 25, 2021 03:35
Skeletal build.bat build script for Windows
@echo off
if not exist build mkdir build
pushd build
setlocal
call "D:\Apps\Visual Studio\VC\Auxiliary\Build\vcvarsall" x64
@ishan9299
ishan9299 / convert.js
Last active December 26, 2021 01:54
Convert hex to 8 bit colors.
const table = [
'073642',
'dc322f',
'859900',
'b58900',
'268bd2',
'd33682',
'2aa198',
'eee8d5',
'002b36',