Skip to content

Instantly share code, notes, and snippets.

View freemo's full-sized avatar

Jeffrey Phillips Freeman freemo

View GitHub Profile
@freemo
freemo / script
Last active September 20, 2019 16:59
Colorized git contribotor log
git log --author=Freeman --format="%Cgreen%ci%Creset %s%Creset" > worklog.txt
@freemo
freemo / keybase.md
Created August 4, 2016 03:12
keybase identity verification.

Keybase proof

I hereby claim:

  • I am freemo on github.
  • I am freemo (https://keybase.io/freemo) on keybase.
  • I have a public key ASCk2DELJdA6Vm5uWDRrGXEGbl2K6ROCtnfN8vtt-U_j6Ao

To claim this, I am signing this object:

@freemo
freemo / HyperassociativeMap.java
Last active April 12, 2017 15:42
Hyperassociative Map
/**
* A Hyperassociative Map is a new type of algorithm that organizes an arbitrary
* graph of interconnected nodes according to its associations to other nodes.
* Once a new Hyperassociative Map has been associated and aligned, nodes that
* are most closely associated will be closest to each other.
* For more info, please see the
* <a href ="http://wiki.syncleus.com/index.php/dANN:Hyperassociative_Map">
* Hyperassociative-Map dANN Wiki page</a>.
* @author Jeffrey Phillips Freeman
* @param <G> The graph type
@freemo
freemo / .zshenv
Last active February 3, 2023 02:20
Custom ZSH Prompt
if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
source "${ZDOTDIR:-$HOME}/.zprofile"
fi
@freemo
freemo / Git History Graph.sh
Last active September 13, 2017 02:15
Show history as graph in #git
git log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"
@freemo
freemo / Script
Last active September 20, 2019 08:49
Remove ignored files in git
git clean -ndX #list files that would be removed
git clean -fdX #Actually remove them
@freemo
freemo / PerfectNumber.hs
Created February 25, 2018 10:19
Perfect Number in Haskell
let dividends y = tail [ quot x z | z <- [1..(floor (sqrt (fromIntegral y)))], x <- [y, z^2], (mod y z) == 0]
let perfect y = sum (dividends y) == y
let perfectlist z = [y | y <-[1..z], perfect y]
perfectlist 4
[1,6,28,496,8128]
@freemo
freemo / AstarSearch.java
Last active September 20, 2019 08:49
AStar algorithm in Java
import java.util.*;
public class AstarSearch {
private final Map<Integer, Set<Neighbor>> adjacency;
private final int destination;
private final NavigableSet<Step> pending = new TreeSet<>();
public AstarSearch(Map<Integer, Set<Neighbor>> adjacency, int source, int destination) {
this.adjacency = adjacency;
@freemo
freemo / Bring up container (aws-cli)
Last active November 12, 2019 10:31
QOTO on AWS
aws ecs register-task-definition --family load-balancer --network-mode bridge --container-definitions "$(cat container-def.json)" --volumes "$(cat volumes-def.json)"
# Launch ECS task, when above command ran once X == 1, for every update X increases by one.
# will have too double check docs how to get latest
aws ecs run-task --cluster default --task-definition load-balancer:X --count 1
@freemo
freemo / script
Last active September 20, 2019 08:18
Check listening ports with process on OSX
lsof -Pn -i -sTCP:LISTEN