Skip to content

Instantly share code, notes, and snippets.

View jkolyer's full-sized avatar

Jonathan Kolyer jkolyer

  • Dev Crew 9000
  • San Francisco
View GitHub Profile
@jkolyer
jkolyer / block-kit-types.ts
Created June 20, 2021 16:10
Slack Block Kit typescript types
export enum BlockTypeEnum {
section = 'section',
actions = 'actions',
divider = 'divider',
image = 'image',
context = 'context',
input = 'input',
header = 'header',
}
@jithinabraham
jithinabraham / graph.rb
Last active January 5, 2024 03:31
Dijkstra's algorithm implemented in ruby
#ruby 2.3.1 recomended
class Graph
attr_reader :graph, :nodes, :previous, :distance #getter methods
INFINITY = 1 << 64
def initialize
@graph = {} # the graph // {node => { edge1 => weight, edge2 => weight}, node2 => ...
@nodes = Array.new
end