Skip to content

Instantly share code, notes, and snippets.


Alejandro AR kinduff

View GitHub Profile
kinduff /
Last active Apr 24, 2021
[Fix Github Header using Stylus] #stylus

Fix Github Header using Stylus

Step 1: Install Stylus

Step 2: Install the style

Install directly with Stylus

kinduff / donquijote.txt
Last active Apr 26, 2020
Don Quijote de la Mancha en Texto Plano
View donquijote.txt
This file has been truncated, but you can view the full file.
Capítulo I. Que trata de la condición y ejercicio del famoso hidalgo don Quijote de la Mancha

Keybase proof

I hereby claim:

  • I am kinduff on github.
  • I am kinduff ( on keybase.
  • I have a public key whose fingerprint is 1560 2754 A367 26FA 204F 588E 111B 8174 3316 4BC9

To claim this, I am signing this object:

View insertion_sort.rb
def sort(values)
length = values.size - 1
1.upto(length) do |i|
temp = values[i]
j = i - 1
while j >= 0 and values[j] > temp
values[j+1] = values[j]
j -= 1
View bubble_sort.rb
def sort(values)
length = values.size - 2
swapped = true
while swapped
swapped = false
0.upto(length) do |i|
if values[i] > values[i+1]
values[i], values[i+1] = values[i+1], values[i]
View binary_search.rb
def findIndex(values, target)
binarySearch(values, target, 0, values.size - 1)
def binarySearch(values, target, start, finish)
return -1 if start > finish
middle = ((start+finish)/2).floor
value = values[middle]
View hash_table_linked_list.rb
class LinkedList
class Node
class HashTable
def initialize(size)
View linked_list_removeAt.rb
def removeAt(index)
prev = nil
node = @head
i = 0
loop do
prev = node
node =
i += 1
break unless !node.nil? and i < index
View linked_list.rb
class LinkedList
def initialize
@head = @tail = nil
def add(value)
node =
@head = node if @head.nil? = node unless @tail.nil?
View hash_table.rb
class HashTable
def initialize(size)
@size = size
@buckets =
def add(value)
index = hash(value)
@buckets[index] = value