Skip to content

Instantly share code, notes, and snippets.

View jakergrossman's full-sized avatar
🍇
Learning New Things

Jake Grossman jakergrossman

🍇
Learning New Things
  • Dallas, TX
View GitHub Profile
@jakergrossman
jakergrossman / .clang-format
Last active February 26, 2024 06:10
Preferred Formatting for clang-format
BasedOnStyle: LLVM
BreakBeforeBraces: Linux
UseTab: Always
IndentWidth: 4
TabWidth: 4
LineEnding: LF
AllowShortBlocksOnASingleLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'false'
AllowShortIfStatementsOnASingleLine: Never
@jakergrossman
jakergrossman / .vimrc
Last active October 10, 2025 14:25
Minimal CSV highlighting
func! s:init_groups_from_colors()
let colors = [ 'red', 'green', 'blue', 'magenta', 'NONE', 'darkred', 'darkblue', 'darkgreen', 'darkmagenta', 'darkcyan' ]
for ci in range(len(colors))
let cmd = 'highlight column%d ctermfg=%s guifg=%s'
exe printf(cmd, ci, colors[ci], colors[ci])
let cmd = 'highlight escaped_column%d ctermfg=%s guifg=%s'
exe printf(cmd, ci, colors[ci], colors[ci])
endfor
endfunc
@jakergrossman
jakergrossman / animated_perlin.m
Last active March 31, 2022 14:06
Animated Perlin Noise with MATLAB
function [] = animated_perlin(min, max, segments, duration, options)
%% ANIMATED_PERLIN
% SYNTAX
% animated_perlin(min, max, segments, duration, Name, Value, ...)
%
% INPUTS:
% MIN Lower bound on data range in the X and Y dimensions.
%
% MAX Upper bound on data range in the X and Y dimensions.
%
@jakergrossman
jakergrossman / aoc2015-17.lsp
Last active December 14, 2021 23:38
Solution to Day 17 of 2015's Advent of Code. A variation of the Subset Sum problem.
; Day 17: No Such Thing as Too Much
; https://adventofcode.com/2015/day/17
; https://adventofcode.com/2015/day/17/input
(defun get-lines (filename)
(with-open-file (stream filename)
(loop :for line = (read-line stream nil nil)
:while line
@jakergrossman
jakergrossman / hangman.lsp
Created December 6, 2021 04:29
Short implementation of hangman in GNU Common LISP.
#!/usr/bin/gcl -f
; set random state
(setf *random-state* (make-random-state t))
(defun read-lines (stream)
(loop :for line = (read-line stream nil nil)
:while (and line (> (length line) 0))
:collect line))
@jakergrossman
jakergrossman / rndlong.asm
Last active September 3, 2021 19:27
Short routine to demonstrate seeding random numbers with clock_gettime & getpid in x86 assembly
;
; rndlong.asm - demo routine to generate a random 64-bit value (long) in x86 assembly
;
; The algorithm was drawn from tempname.c in the glibc source. Relevant files:
; https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/posix/tempname.c;h=ff38f1e31fe36af8852ad7670cf9b547f40b36de;hb=HEAD
; https://sourceware.org/git/?p=glibc.git;a=blob;f=include/random-bits.h;h=077b46736cda38353078316de1890ac7a3a9874a;hb=HEAD
;
; Building, Linking, and Running:
;
; $ nasm -felf64 rndlong.asm
@jakergrossman
jakergrossman / gfl_plugin.sp
Last active April 13, 2020 21:30
Short plugin for demonstrating SourcePawn experience.
#include <sourcemod>
public Plugin pluginInfo = {
name = "GFL Programming Application Submission Test",
author = "Jake Grossman",
description = "A simple plugin to demonstrate reasonable proficiency",
version = "1.0",
url = "https://jakergrossman.xyz"
}