Skip to content

Instantly share code, notes, and snippets.

View reflechant's full-sized avatar

Roman Gerasimov reflechant

  • Amsterdam
View GitHub Profile
@reflechant
reflechant / pswd-gen.lua
Created January 13, 2016 20:31
Command-line strong password generator (the only parameter is password length, default is 8)
math.randomseed(os.time())
length = arg[1] or 8
for i = 1, length do
io.stdout:write( string.char(math.random(33,126)) )
end
print()
io.read()
@reflechant
reflechant / binary-clock-patterns.py
Last active January 13, 2016 20:33
This program draws patterns to remember if you have bought a binary watch (for example from 01theone.com)
#!/usr/bin/env python
from Tkinter import *
master = Tk()
w = Canvas(master, width=150, height=930)
#for n in range(1,61):
n = 1
for x in ( 3,6,12,24,48,7,14,28,56,15,30,60,5,10,20,40,21,42 ):
i = 0
@reflechant
reflechant / dict-client.py
Last active February 2, 2017 08:35
A simple command-line client for Yandex.Translate service
#!/usr/bin/env python3
# A simple command-line client for Yandex.Translate.
# You may pass translate direction as command line parameter e.g. "./dict-client.py fr-en"
# Default translate direction is from English to Russian.
#!/usr/bin/env python3
import requests
import sys