Skip to content

Instantly share code, notes, and snippets.

View chaoslogick's full-sized avatar
👻
localghost

mpg chaoslogick

👻
localghost
View GitHub Profile
@chaoslogick
chaoslogick / bg_random.js
Created January 14, 2016 18:50
JS: Randomize DOM BG color
function changeBGColor() {
document.bgColor = document.colorChange.text.value;
document.colorChange.colorValue.value = '';
}
function randomBG() {
var h1 = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');
var h2 = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');
var h3 = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');
var h4 = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');
var h5 = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');
@chaoslogick
chaoslogick / tree.sh
Created January 14, 2016 18:48
BASH: Create matrix for Y Tree ASCII shape
#!/bin/bash
read n;
declare -A matrix
num_rows=63
num_columns=100
for ((i=1;i<=num_rows;i++)) do
for ((j=1;j<=num_columns;j++)) do
matrix[$i,$j]="_";
done
@chaoslogick
chaoslogick / .gitconfig
Last active October 27, 2017 16:58
GIT: .gitconfig
[user]
name = Michael Perry Goodman
email = [redacted]
[filter "lfs"]
clean = git lfs clean %f
smudge = git lfs smudge %f
required = true
[core]
@chaoslogick
chaoslogick / .profile
Last active November 29, 2017 16:34
BASH: Personal .bashrc/.profile
#-------------------------------------------------
# global definitions
#-------------------------------------------------
# if not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# or force ignoredups and ignorespace
export HISTCONTROL=ignoredups:ignorespace
@chaoslogick
chaoslogick / setup.sh
Last active October 26, 2018 15:54
BASH: Personal setup.sh for OSX
#!/bin/bash
# Alot of these configs have been taken from the various places
# on the web
# Set the colors you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'