files
This commit is contained in:
parent
038ed4dd54
commit
918dd9e0ae
|
@ -0,0 +1,51 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
#-*- coding: utf-8 -*-
|
||||||
|
################################################################################
|
||||||
|
# 'xkcd_936.py', created by motius, on 2017-10-24
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
"""
|
||||||
|
Sans compte root :
|
||||||
|
apt-get download wfrench
|
||||||
|
ar x wfrench
|
||||||
|
tar xvfJ data.tar.xz
|
||||||
|
ln -rs usr/share/dict/french .
|
||||||
|
Changer LISTE_DE_MOTS en "french"
|
||||||
|
"""
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
import random
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# paramètres de génération de mots de passe
|
||||||
|
|
||||||
|
LISTE_DE_MOTS = "/usr/share/dict/french"
|
||||||
|
NB_MOTS = 5 # > 3
|
||||||
|
NB_PASSPHRASE = 10 # > 0
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# fonction de génération de mots de passe
|
||||||
|
|
||||||
|
def phrases_de_passe():
|
||||||
|
""" https://www.xkcd.com/936/
|
||||||
|
"""
|
||||||
|
values = []
|
||||||
|
with open(LISTE_DE_MOTS, 'r') as fr:
|
||||||
|
l = fr.readlines()
|
||||||
|
for i in range(NB_MOTS):
|
||||||
|
r = random.randint(1,len(l))
|
||||||
|
values.append(l[r].strip())
|
||||||
|
return values
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# appelle fonction de génération
|
||||||
|
|
||||||
|
for i in range(NB_PASSPHRASE):
|
||||||
|
print(" ".join(phrases_de_passe()))
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# EOF 'xkcd_936.py'
|
||||||
|
################################################################################
|
||||||
|
|
15
shell/vimrc
15
shell/vimrc
|
@ -158,3 +158,18 @@ hi cursorline cterm=none ctermbg=NONE ctermfg=NONE guibg=NONE guifg=NONE
|
||||||
hi CursorLineNr cterm=none
|
hi CursorLineNr cterm=none
|
||||||
set cursorline
|
set cursorline
|
||||||
|
|
||||||
|
" pageup pagedown
|
||||||
|
nnoremap <PageUp> :echo ""<CR>
|
||||||
|
vnoremap <PageUp> :<C-u>echo ""<CR>
|
||||||
|
inoremap <PageUp> <C-o>:echo ""<CR>
|
||||||
|
nnoremap <PageDown> :echo ""<CR>
|
||||||
|
vnoremap <PageDown> :<C-u>echo ""<CR>
|
||||||
|
inoremap <PageDown> <C-o>:echo ""<CR>
|
||||||
|
|
||||||
|
nnoremap <S-PageUp> :echo ""<CR>
|
||||||
|
vnoremap <S-PageUp> :<C-u>echo ""<CR>
|
||||||
|
inoremap <S-PageUp> <C-o>:echo ""<CR>
|
||||||
|
nnoremap <S-PageDown> :echo ""<CR>
|
||||||
|
vnoremap <S-PageDown> :<C-u>echo ""<CR>
|
||||||
|
inoremap <S-PageDown> <C-o>:echo ""<CR>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
[main]
|
||||||
|
port = 8090
|
||||||
|
count = 3
|
||||||
|
compressed = gz
|
||||||
|
|
Loading…
Reference in New Issue