Skip to content

Instantly share code, notes, and snippets.

@gbnk0
gbnk0 / package_updates_check.py
Created August 26, 2016 11:44 — forked from yumminhuang/package_updates_check.py
Python script to check apt-get updates
#!/usr/bin/env python
#coding=utf-8
import apt
import apt_pkg
from time import strftime
import os
import subprocess
import sys
@gbnk0
gbnk0 / cursor_animation.py
Created May 22, 2016 00:59 — forked from kholis/cursor_animation.py
Python Text Cursor Animation
#!/usr/bin/env python
# taken from: http://stackoverflow.com/questions/7039114/waiting-animation-in-command-prompt-python
import threading
import time
class CursorAnimation(threading.Thread):
def __init__(self):
self.flag = True
@gbnk0
gbnk0 / passgen.py
Created May 9, 2016 00:04 — forked from 0xPr0xy/passgen.py
password generator
from string import digits, ascii_letters
from random import choice
from sys import argv
def generator(length):
chac = digits + ascii_letters
pwd = list()
for p in range(length):
pwd.append(choice(chac))
print("".join(pwd))