Skip to content

Instantly share code, notes, and snippets.

My first gist!
Arbitrary list:
- mountains
- electronics
- onions
@m0n4d1
m0n4d1 / test.md
Last active February 25, 2019 18:30

Test Heading

Sub Heading

My List

  • cake
  • satilites
  • paper

Some code

ruby = "Ruby"
@m0n4d1
m0n4d1 / loop_vs_hardcoded.rb
Created March 1, 2019 22:56
ruby Iteration insights
my_array = [1,2,3]
#Loop iteration
#---------------------
for item in my_array do
p item
end
#---------------------
@m0n4d1
m0n4d1 / treadmill_sort.rb
Last active May 25, 2019 17:31
Treadmill Sort
# -------------------------
# Treadmill Sort
# -------------------------
# written in ruby 2.5.3
# recursive
# -------------------------
# reduces an array into its lowest value item
def min arr
if arr.length > 1
#____________
#recursive pure arithmatic
#____________
#length of a base10 number counting from 0
def length n
Math.log10(n).floor
end
# Reduces an integer to its first digit eg. 321 #=> 3
def get_first_digit n

test

test

  • test1
  • test2
  • test3
services = {
xserver = {
enable = true;
windowManager.xmonad.enable = true;
windowManager.xmonad.enableContribAndExtras = true;
desktopManager.default = "none";
desktopManager.xterm.enable = false;
windowManager.default = "xmonad";
};
openssh.enable = true;
@m0n4d1
m0n4d1 / .xmobarrc
Created August 24, 2019 05:16
xmonad config
Config { font = "xft:Bitstream Vera Sans Mono:size=9:regular:antialias=true"
, overrideRedirect = False
, borderColor = "#2C323C"
, border = TopB
, bgColor = "#21252B"
, fgColor = "#828997"
, position = TopW L 100
, commands = [ Run Weather "CYVR" ["-t","<tempC>C","-L","18","-H","25","--normal","#98c379","--high","red","--low","lightblue"] 36000
, Run Network "wlp2s0" ["-L","0","-H","32","--normal","#98c379","--high","#e06c75"] 10
, Run Cpu ["-L","3","-H","50","--normal","#98c379","--high","#e06c75"] 10
@m0n4d1
m0n4d1 / pure-matrix-operations.js
Last active July 7, 2022 04:17
Pure Functional Matrix Operations
// Pure Functional Matrix Operations
// built using partially applied curried functions
// I wrote function signatures with pseudo types to help me remember what things do
// All these functions gradually compose into ones capable various matrix operations
//---------------------------------------
// BUILDING BLOCKS