Skip to content

Instantly share code, notes, and snippets.

@manubete
manubete / longest_palindrome.py
Last active March 20, 2018 02:39
Longest Palindrome given input string
def longest_palindrome(input_string):
# separated the string into a list made of it's characters
# populated a dictionary with unique characters and their counts
char_list = list(input_string)
char_dict = dict()
for char in char_list:
if char not in char_dict:
char_dict[char] = 1
else:
@manubete
manubete / jwt_token_challenge.rb
Last active June 19, 2017 23:57
Json web token generator
require 'jwt'
require 'rainbow'
# test tools that were not as productive as interacting with CLI
#require "test/unit"
#require 'open3'
#test use cases --------------------
# 1) make sure that user_id and email are necessary fields to complete to finish loop
@manubete
manubete / winning_rory.txt
Created January 26, 2014 21:42
Winning in the command line obstacle course!!
335 cd Documents
336 ls
337 cd Programming
338 ls
339 cd Github
340 ls
341 git clone --barehttps://github.com/manubete/CLI-Obstacle-Course
342 ls
343 git clone --bare https://github.com/manubete/CLI-Obstacle-Course
344 ls
@manubete
manubete / 0.2.1-boggle_class_from_methods.rb
Last active January 3, 2016 01:39 — forked from dbc-challenges/0.2.1-boggle_class_from_methods.rb
phase 0 unit 2 week 1 boggle class challenge
class BoggleBoard
def initialize(board)
@boggle_board = board
@diag = []
end
def create_word(*coords)
coords.map { |coord| @boggle_board[coord.first][coord.last] }.join("")
end