Skip to content

Instantly share code, notes, and snippets.

View alexdovzhanyn's full-sized avatar
🚀

Alex Dovzhanyn alexdovzhanyn

🚀
View GitHub Profile

Keybase proof

I hereby claim:

  • I am alexdovzhanyn on github.
  • I am alexdovzhanyn (https://keybase.io/alexdovzhanyn) on keybase.
  • I have a public key ASBAi58lSBUGFurq4J9mi0uQTHe_YWvfsdGE2xRmHdI4sAo

To claim this, I am signing this object:

"Allow syntax highlighting based on filetype
filetype plugin indent on
syntax on
"Convert tabs to spaces. 1 tab = 2 spaces
set tabstop=8 softtabstop=0 expandtab shiftwidth=2 smarttab
"Enable pathogen plugins
execute pathogen#infect()
#!/bin/bash
echo 'Installing Gnome...'
sudo apt-get install gnome-terminal
echo "Done"
echo 'Installing cURL...'
sudo apt-get install curl
echo 'Done'
characters = ('a'..'z').to_a + ('0'..'9').to_a + ["!", "@", "#", "$", "%", "^", "&", "*",]
password = ""
print "How long should your password be? "
len = gets.chomp.to_i
len.times{n = rand(0..43); password += characters[n].to_s;}
puts password
puts "Min?"; @minimum = gets.chomp.to_i; @base = @minimum
puts "Max?"; @maximum = gets.chomp.to_i; @guesses = 0
def search(min, max)
guess = min + (max - min) / 2
puts guess
answer(min, max, guess)
end
def answer(min, max, guess)