Skip to content

Instantly share code, notes, and snippets.

View christophergorexyz's full-sized avatar

Christopher Gore christophergorexyz

View GitHub Profile
<html>
<head>
<title>hitomezashi stitching</title>
</head>
<body>
<input id="seedX" />
<input id="seedY" />
<button id="generate">generate</button>
@christophergorexyz
christophergorexyz / sierpenski-carpet.html
Last active April 7, 2022 17:18
an implementation of the sierpenski carpet
<html>
<head>
<title>sierpenski</title>
</head>
<body>
<canvas id="sierpenski" width="2187" height="2187"></canvas>
<script>
let canvas = document.getElementById('sierpenski');
@christophergorexyz
christophergorexyz / samplePointJulia.js
Last active February 20, 2020 04:29
sample a complex number for membership in julia sets
const MAX_SAMPLES = 1000;
const MAX_RADIUS = 2 ** 4;
/**
* a complex number, c, belongs to The Mandelbrot Set if the iterative application
* of the function f(z)=z^2+c, starting at z=0, does not result in divergence
* beyond a specified radius before a specified number of iterations
*
* a complex number, z, belongs to The Julia Set if the iterative application
* of the function f(z)=z^2+c, where c is a constant, does not result in divergence
@christophergorexyz
christophergorexyz / .tmux.conf
Created February 14, 2020 15:17
tmux config
# Turn on the mouse
set -g mouse on
# Scroll History
set -g history-limit 30000
# Set ability to capture on start and restore on exit window data when running an application
setw -g alternate-screen on
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
@christophergorexyz
christophergorexyz / index.html
Last active May 13, 2016 22:37
A Mandelbrot Viewer
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Mandelbrot</title>
<style>
html,
body {
alias ls="ls -G"
alias l="ls -1"
PATH=$PATH:~/bin
export PS1='[ \[$(tput setaf 5)\]\u\[$(tput setaf 7)\]@\[$(tput setaf 2)\]\h\[$(tput setaf 7)\]: \[$(tput setaf 1)\]\W\[$(tput setaf 7)\] ] \[$(tput sgr0)\]'
export PAGER='most'
@christophergorexyz
christophergorexyz / base64-file.html
Created March 24, 2015 21:09
read file as base64
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>test</title>
</head>
<body>
<input type="file" capture="camera" accept="image/*" id="cameraInput" name="cameraInput">
<script type="text/javascript">
var i = document.getElementById('cameraInput');
@christophergorexyz
christophergorexyz / .vimrc
Last active April 3, 2025 02:52
.vimrc
"auto complete using ALE, must be set before loading the plugin
let g:ale_completion_enabled=1
"load any plugins here
call plug#begin()
"linting with ALE
Plug 'dense-analysis/ale'
call plug#end()
"ALE config
@christophergorexyz
christophergorexyz / super-simple-responsive.html
Created January 24, 2014 20:21
A demonstration of a simple way to execute a responsive design without over-reliance on a framework
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Super Simple Responsive</title>
<style type="text/css">
/*
Make sure that when we set width, it includes the border and padding.
@christophergorexyz
christophergorexyz / csgitmv.sh
Last active December 24, 2015 02:39
A case sensitive hack for git mv.
#!/bin/bash
tmpFile=`mktemp .csgitmv.XXXX`
git mv -f $1 $tmpFile
git mv $tmpFile $2