Skip to content

Instantly share code, notes, and snippets.

@Hafpaf
Hafpaf / reverse_string.py
Last active May 9, 2019 10:12
IT-09-05-2019
def stuff(texty):
t = ""
for i in range(len(texty)):
ch = texty[i]
print(ch, ord(ch))
t = ch + t
print(t)
s = input("s: ")
stuff(s)
@Hafpaf
Hafpaf / convert.py
Last active May 2, 2019 18:48
Convert decimal to biniary, octal, hexadecimal and charc.
'''
for i in range(16):
print(i, bin(i), oct(i), hex(i))
'''
def hexthingy(bin_c, oct_c, hex_c, chr_c):
for i in range(1):
print(i, bin(bin_c), oct(oct_c), hex(hex_c), chr(chr_c))
#convert decimal to biniary, octal, hexadecimal and charc.
hexthingy(31, 63, 127, 255)
@Hafpaf
Hafpaf / keybase.md
Created October 4, 2018 13:33
Keybase proof

Keybase proof

I hereby claim:

  • I am hafpaf on github.
  • I am hafpaf (https://keybase.io/hafpaf) on keybase.
  • I have a public key whose fingerprint is 56F3 BC39 E4C1 CBF0 C14E 7F32 931F 598B 90D3 DD6E

To claim this, I am signing this object: